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 All
I have a Calendar reference table which has dates spanning 100 years.
I am using this to pull back month and year alongside a table with data relating to activity. The graph is using a measure to calculate the number of cases that were open at the end of the month.
This is working perfectly for the data that I have - however, the data only runs up to April 2019 - but because I am using the Calendar table to pull back the month and year, the X axis runs on in perpetuity to the end of my 100 years.
How can I limit the graph dynamically so that it only shows data up to a given date (in some cases this will be the last day of the previous month, in other cases, it will be the current date. I may also need to show future dates in other graphs in the model.
hi, @Anonymous
Just add a conditional in your measure formula as below:
For example:
cumulative sum = CALCULATE(SUM(Table2[Qty]),FILTER(ALL('Calendar'),'Calendar'[Date]<=MAX('Calendar'[Date])))
Measure = CALCULATE(SUM(Table2[Qty]),FILTER(ALL('Calendar'),'Calendar'[Date]<=MAX('Calendar'[Date])&&MAX(Table2[Date])>='Calendar'[Date]))
Result:
and if you want in some cases to choose, you could refer to this blog add multiple measure for slicer change
Dynamically change the information within a visual via a slicer
Best Regards,
Lin
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 |
---|---|
107 | |
98 | |
78 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |