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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
NewbieJono
Post Patron
Post Patron

Cumulative Total

i have a cumulative total that seems to work fine. however when I add a date drill down it seems to stip working.

 

The table on the top works and shows 1119014. However below when I  add date it shows 64700. I need this to still show 1119014

 

Capture.PNG

 

dax is:

 

Total = 
CALCULATE (
    [Daily Volumes],
 ALL ('DIM - Days Bridge Table') )
1 ACCEPTED SOLUTION
v-kaiyue-msft
Community Support
Community Support

Hi @NewbieJono ,

 

Thanks to @MNedix  for the reply, please allow me to provide another insight:


You can use the following measures, use the IF() + HASONEVALUE() function to determine the data level, and then perform different calculations based on the level.


I created this data.

vkaiyuemsft_0-1714114483001.png

 

1. Create a measure.

_sum =
SUM('Table'[value])

2. Create measure to calculate total.

Total =
IF(HASONEVALUE('Table'[date]),
SUM('Table'[value]),
CALCULATE
(SUM('Table'[value]),
ALL('Table')))

vkaiyuemsft_1-1714114513068.png

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-kaiyue-msft
Community Support
Community Support

Hi @NewbieJono ,

 

Thanks to @MNedix  for the reply, please allow me to provide another insight:


You can use the following measures, use the IF() + HASONEVALUE() function to determine the data level, and then perform different calculations based on the level.


I created this data.

vkaiyuemsft_0-1714114483001.png

 

1. Create a measure.

_sum =
SUM('Table'[value])

2. Create measure to calculate total.

Total =
IF(HASONEVALUE('Table'[date]),
SUM('Table'[value]),
CALCULATE
(SUM('Table'[value]),
ALL('Table')))

vkaiyuemsft_1-1714114513068.png

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

MNedix
Solution Supplier
Solution Supplier

Hi,

Have you tried ALLSELECTED instead of ALL?

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.