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, I have a Calendar table like below. This table is connected with a Fact Table (Which has Date and Sales)
Scenario: I would like to create two score card, one for MTD and another for LYMTD which will be based on a Calendar date slicer on my report.
Challenge: When I select 25th March, On one card I should see MTD and on another card, I would like to see LYMTD (based on available dates in the LYDate column and note on the calendar date)
Example: LYMTD should only count dates from 02-Mar-22 to 23-March-22 + 02-Apr-222 to 04-Apr-222.
Basically, I want to compare MTD and LYMTD by row and not by dates.
Also, it should be dynamic.
@AllisonKennedy I tried but the above measure is not working. No, the LYDate can be changed by the business user.
@iamhuz Sorry for the delay in reply. What does your data model look like? Did you create the inactive relationship first? What about the above measure doesn't work?
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@iamhuz Is the LYDate unique? You could create an inactive relationship and use USERELATIONSHIP inside a calculate measure:
measure = calculate ( [this year measure], USERELATIONSHIP ( factTable[date], dateTable[LYdate] ) )
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
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 |
---|---|
143 | |
78 | |
63 | |
52 | |
47 |
User | Count |
---|---|
212 | |
82 | |
61 | |
61 | |
60 |