Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi, I am new to Power BI and am trying to create a KPI visualisation showing the number of total enquiries vs the number of enquiries we had for the same day last month.
i.e. Today, 24th Sept we have had 1820 enquiries since 1st Sept, I would like to have this compare to the total enquiries for 1st August - 24th August, rather than comparing against the whole previous month.
I have already set up my 'Total Enquiries' Measure, I am just unsure on the DAX for 'same day last month'.
I hope this makes sense.
Thanks in advance.
Lyane
Solved! Go to Solution.
HI @lgbclick
Hope you have the date table in your model. If not, please create and join appropriately .
Create Sales MTD measure for Sep month as follows:
Sales_MTD=CALCULATE(SUM(Sales_Fact.Sales),DATESMTD(Dates[Date]))
For AUg Month MTD, it will be in 2 steps:
Step 1: Sales_LastMonth=CALCULATE(SUM(Sales_Fact.Sales),DATEADD(Dates[Date],-1,MONTH) Step 2: Sales_LMTD=CALCULATE(Sales_LastMonth,DATESMTD(Dates[Date]))
Hope this helps.
Thanks
Raj
HI @lgbclick
Hope you have the date table in your model. If not, please create and join appropriately .
Create Sales MTD measure for Sep month as follows:
Sales_MTD=CALCULATE(SUM(Sales_Fact.Sales),DATESMTD(Dates[Date]))
For AUg Month MTD, it will be in 2 steps:
Step 1: Sales_LastMonth=CALCULATE(SUM(Sales_Fact.Sales),DATEADD(Dates[Date],-1,MONTH) Step 2: Sales_LMTD=CALCULATE(Sales_LastMonth,DATESMTD(Dates[Date]))
Hope this helps.
Thanks
Raj
Thanks Raj. Thats great.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |