I have 3 tables that I have pulled into Power BI.
DateTable1 (client-wise month start and end dates):
Client|MonthNumber|MonthStartDate|MonthEndDate
DateTable2 (1 row for each day, for each client):
Client|Date|QuarterNumber
FactSales:
OrderDate|OrderAmt|ProductName
I want to create 1 date table in Power BI such that it has 1 row for each day, for each client and has got the MonthNumber, QuarterNumber.
In SQL I would do an inner join on client name and where criteria to filter on the date range.
Related
There are only 2 tables in my model
Calendar Table: Calendar table in Power BI generated through Power Query.
Events table: I am capturing events throughout the year in an Events table. But the problem is event details are by month, no date but just year and month. I concatenated the year and month and converted them into a date to tie it up with the datekey of the Calendar table.
The expected visual is as below and I am unable to display the weeks as shown below as the data is monthly. I somehow have to merge all the weeks into displaying the values under the month. is this possible?
Hello Everyone i am trying to get a Days Interval column through getting the differnce between Todays Date and a column Refresh date in Power Query, How do i go about it.
I want to do this in Power Query
= DateTime.Date(DateTime.LocalNow())-[Refresh Date]
The Power Query Editor queries Requests by 2 parameters StartDate and EndDate:
I want to pass a date range (Start Date and End Date) from Power BI Report into above parameters so that it can directly query new data set from SQL Server.
It is working if I create 2 columns Start Date and End Date in Model then Bind to query parameters.
If a Between slicer used in the Report, Start date and End date are extracted as 2 measures using DAX.
Start Date = CALCULATE(MIN(Dates[Date]),ALLSELECTED(Dates[Date]))
End Date = CALCULATE(MAX(Dates[Date]),ALLSELECTED(Dates[Date]))
Unluckily, there is no Binding option in Measure. Any idea of how to wire this 2 measures to query parameter please?
I want to do countif in PowerBI (Example: count of total item with condition #1: having transaction of 2 or more, condition #2: year)
I have sample data comprised of PO (transaction) #, item #, date (year), item description, ship to location.
I can achieve the result through Excel - Pivot a matrix table of rows of items, columns of year and the value is count of PO/transactions. A separate table on the side is utilized to count the total item within Column (Years) that has transaction count > 2.
I can't figure out what DAX to use in PowerBI to achieve the same thing as I could with Excel:
Sample of transaction counts:
Usually COUNTIFS in Excel are implemented by use of CALCULATE(<expression>,<filter1>,<filter2>…) in Power BI, for example:
CALCULATE(SUM(Table1[Column1]), FILTER(Table1, Table1[Column1] < Table1[Column2]))
Read more details here.
I have created a cube with one fact table and 5 dimension which includes one Date dimension. Hierarchy of date dimension is Year -> Quater -> Month. Here I want to select the last six months data from selected month using mdx query. The output should be Month (Row Level) and Measures on Column level.
Thought of creating a dynamic named set but power BI doesn't consume named sets.
Can anyone please suggest a way to do it in MDX either using a disconnected date dimension or any idea in Power BI?
Take a look at the sample below
select
[Measures].[Internet Sales Amount]
on 0
,
[Date].[Calendar].[Month].&[2012]&[4].lag(6):
[Date].[Calendar].[Month].&[2012]&[4]
on 1
from
[Adventure Works]
Result