Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
My bookyear 2024 = 01/01/2024 untill 31/03/2025
I need to create a YTD sum untill the selected period.
For 'Uitzonderlijke kosten', I don't see a value for Amount YTD because there is no value for the selected period.
When I check per month, there is already a cost in earlier months:
My total is correct, but I don't see all the values in the details.
My formula:
Solved! Go to Solution.
Hi @Annelies ,
It looks like the issue is with how your Amount YTD measure behaves when there’s no value for the selected period at the detail level.
This is a common thing in Power BI: If a row (like "Uitzonderlijke kosten") doesn’t have a value in the current period, the Amount YTD will just show blank for that row, even if there are values in previous periods. The total works, but the breakdown doesn’t show values unless there’s something in the current context.
How to fix:
You can use the COALESCE or BLANK handling in your measure to always show the cumulative sum, even if the current period is blank. Try this pattern:
Amount YTD = VAR SelectedPeriod = SELECTEDVALUE('Calendar'[Period]) RETURN IF( ISBLANK([Amount]), CALCULATE( [Amount], FILTER( ALL('Calendar'[Period]), 'Calendar'[Period] <= SelectedPeriod ) ), CALCULATE( [Amount], FILTER( ALL('Calendar'[Period]), 'Calendar'[Period] <= SelectedPeriod ) ) )
Or, even simpler, use:
Amount YTD = CALCULATE( [Amount], FILTER( ALL('Calendar'[Period]), 'Calendar'[Period] <= SELECTEDVALUE('Calendar'[Period]) ) )
and in your matrix visual, under "Show items with no data" (in the field settings), turn this ON for your row/column fields. This helps to display the previous months’ sums even if the current cell is blank.
Let me know if this solves it, or if you still get blanks!
Hi @Annelies ,
I would also take a moment to thank @burakkaragoz for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If the response has addressed your query, please Accept it as a solution so that other community members can find it easily.
Thank you
Harshitha.
Community Support Team.
Hi @Annelies,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please Accept it as a solution so that other community members can find it easily.
Thank you.
Hi @Annelies,
May I ask if you have resolved this issue? If so, please mark the helpful reply and Accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @Annelies ,
It looks like the issue is with how your Amount YTD measure behaves when there’s no value for the selected period at the detail level.
This is a common thing in Power BI: If a row (like "Uitzonderlijke kosten") doesn’t have a value in the current period, the Amount YTD will just show blank for that row, even if there are values in previous periods. The total works, but the breakdown doesn’t show values unless there’s something in the current context.
How to fix:
You can use the COALESCE or BLANK handling in your measure to always show the cumulative sum, even if the current period is blank. Try this pattern:
Amount YTD = VAR SelectedPeriod = SELECTEDVALUE('Calendar'[Period]) RETURN IF( ISBLANK([Amount]), CALCULATE( [Amount], FILTER( ALL('Calendar'[Period]), 'Calendar'[Period] <= SelectedPeriod ) ), CALCULATE( [Amount], FILTER( ALL('Calendar'[Period]), 'Calendar'[Period] <= SelectedPeriod ) ) )
Or, even simpler, use:
Amount YTD = CALCULATE( [Amount], FILTER( ALL('Calendar'[Period]), 'Calendar'[Period] <= SELECTEDVALUE('Calendar'[Period]) ) )
and in your matrix visual, under "Show items with no data" (in the field settings), turn this ON for your row/column fields. This helps to display the previous months’ sums even if the current cell is blank.
Let me know if this solves it, or if you still get blanks!
Leuk wat Nederlands te zien.
Perhaps in your relationship to filter the odd bookyear (period jan 2025 = bookyear 2024) there's a cross filtering leaving something out? As in YTD becomes only the periods jan-feb 2025 but doesn't go back into 2024?
Check the other figures, are you also expecting there 2024 figures? Are they summing to what you need?
User | Count |
---|---|
84 | |
76 | |
75 | |
43 | |
36 |
User | Count |
---|---|
109 | |
56 | |
52 | |
48 | |
43 |