Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi,
I have encountered a problem using my cumulative function. Apparently, the function is taking all the previous sessions. In other words, it is not filtered by my calendar slicer whereas the bar chart is:
In the above picture you can see that it is not starting from a zero nor from the first number in the bar chart. To be specific, it takes all the previous numbers from the data table:
The first data point in the cumulative line should be something around 6k. This is the cumulative function I used:
Total Revenue cumulative =
CALCULATE(SUM([Revenue]),
FILTER(ALL('Calendar'),
'Calendar'[DateKey]<= MAX('Calendar'[DateKey])))
Solved! Go to Solution.
@Anonymous , Not very clear. Try like
Total Revenue cumulative =
CALCULATE(SUM([Revenue]),
FILTER(ALLSELECTED('Calendar'),
'Calendar'[DateKey]<= MAX('Calendar'[DateKey])))
@Anonymous - Without sample data or more information it is hard to say. I would say that it is not correct because you should use ALLSELECTED or ALLEXCEPT except that if you used ALL, then you numbers should be higher than your value for that first day if you were filtering. Any chance you can share the PBIX or more information on what you have as fields/filters in/on that visual?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
@Anonymous , Not very clear. Try like
Total Revenue cumulative =
CALCULATE(SUM([Revenue]),
FILTER(ALLSELECTED('Calendar'),
'Calendar'[DateKey]<= MAX('Calendar'[DateKey])))
@Anonymous , do you need more help on this
Thanks @amitchandak and @Greg_Deckler, I resolved the issue using ALLSELECTED formula. Nevetheless, I encountered another problem, the revenue is using the same y-axis for bar data (normal) and line data (cumulative). Is there any way to add the second y-axis?
@Anonymous - Yes, check under Y-Axis in Formatting pane (paint roller) scroll way, way down, there is an option for Show secondary
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
86 | |
84 | |
66 | |
62 | |
61 |
User | Count |
---|---|
199 | |
120 | |
110 | |
79 | |
69 |