cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jithinrg
Frequent Visitor

Grand total displays the right amount, but the export data total displays a different amount

hi

I have created a dashboard with the financial sample data. the cumulative total shows correct value in the matrix, but when we export the data and do the sum, the value is different.

Fig 1: Power BI matrix table (highlighted table)

jithinrg_0-1675575030147.png

 

Fig2: Export

 

jithinrg_1-1675575094791.png

 

DAX:

1.

Sales =
SUM( financials[ Sales] )
 2. 
Selected Period =
SELECTEDVALUE( financials[Period] )
3.
Sales for Selected Period =
CALCULATE(
    [Sales],
    FILTER(
        financials,
        financials[Period] = [Selected Period]
    )
)

 

4. 

Cumulative Sales =
VAR _Periodcheck =
    CALCULATE(
        MAX( financials[Period] ),
        ALL( financials[Period] )
    )
RETURN
CALCULATE(
    SUM( financials[ Sales] ),
    FILTER(
        all (financials[Period] ),
        financials[Period] <= MAX( financials[Period])
    )
)
 
Any help on this is greatly appreciated.
Note that this dashboard has RLS and page level security.
2 REPLIES 2
jithinrg
Frequent Visitor

Yes @amitchandak The report users are complaining this, because they are confused with the totals. Some transactions are missing, but the grand total is correct. Not sure this might be due to those transactions are filtered by the period filter. Any solution for this?

amitchandak
Super User
Super User

@jithinrg , Are you doing a manual total in excel? Because power bi recalculate the totals to correct then grand total



!! Microsoft Fabric !!
Microsoft Power BI Learning Resources, 2023 !!
Learn Power BI - Full Course with Dec-2022, with Window, Index, Offset, 100+ Topics !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!

Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors