Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Annelies
New Member

Why is sum in detail not visible

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.

 

Annelies_0-1749552564124.png

 

When I check per month, there is already a cost in earlier months:

Annelies_1-1749552599638.png

 

My total is correct, but I don't see all the values in the details.

 

My formula:

Amount YTD = CALCULATE([Amount],ALL('Calendar'[Period]),'Calendar'[Period]<=SELECTEDVALUE('Calendar'[Period])
)
 
 
Someone whe can help me to see the sum of the previous months when the selected month is blank?
 
Thanks!
1 ACCEPTED SOLUTION
burakkaragoz
Community Champion
Community Champion

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:

dax
 
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:

dax
 
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!

View solution in original post

5 REPLIES 5
v-hjannapu
Community Support
Community Support

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.

burakkaragoz
Community Champion
Community Champion

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:

dax
 
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:

dax
 
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!

DouweMeer
Impactful Individual
Impactful Individual

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? 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.