Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi Everyone
Can someone please assist?
My stakeholders are excel lovers and want a view as below (dummy excel data).
If they select a month in the slicer, then the graph must show
My attempts:
So i created a seperate date table, that does not have a relationship to the other tables and then referenced it in the measure below to get the sales for the selected slicer date (and 3 months trailing).
Thanking you in advance
😁
Solved! Go to Solution.
Hi @SammyNed ,
Thanks for the reply from @SachinNandanwar , please allow me to provide another insight:
I use these sample data to demonstrate.
1. create a calculation table. And adjust the date format.
Table =
DISTINCT(‘financials’[Date])
2. create MEASURE.
MEASURE =
VAR _cur_mon =
EOMONTH ( SELECTEDVALUE ( ‘Table’[Date] ), 0 )
VAR _3_mon =
EOMONTH ( SELECTEDVALUE ( ‘Table’[Date] ), -3 ) + 1
RETURN
IF (
MAX ( ‘financials’[Date] ) <= _cur_mon
&& MAX ( ‘financials’[Date] ) >= _3_mon,
1
)
3. Filter the data in the bar chart where MEASURE is 1.
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @SammyNed ,
Thanks for the reply from @SachinNandanwar , please allow me to provide another insight:
I use these sample data to demonstrate.
1. create a calculation table. And adjust the date format.
Table =
DISTINCT(‘financials’[Date])
2. create MEASURE.
MEASURE =
VAR _cur_mon =
EOMONTH ( SELECTEDVALUE ( ‘Table’[Date] ), 0 )
VAR _3_mon =
EOMONTH ( SELECTEDVALUE ( ‘Table’[Date] ), -3 ) + 1
RETURN
IF (
MAX ( ‘financials’[Date] ) <= _cur_mon
&& MAX ( ‘financials’[Date] ) >= _3_mon,
1
)
3. Filter the data in the bar chart where MEASURE is 1.
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
thank you @v-kaiyue-msft . This really helped. I think my issue was with the date table (it was in days and not months)
Please go through this article
https://www.sqlbi.com/articles/rolling-12-months-average-in-dax/
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
18 | |
15 | |
14 | |
11 | |
8 |
User | Count |
---|---|
24 | |
19 | |
12 | |
11 | |
10 |