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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
rixmcx59
Helper V
Helper V

Grand total for measure does not show in total row or in card visual

Hello all, I have three measures stored in a measures table, Start, End and Duration. The duration measurse is a simple DateDiff/days using start and end. If I drop duration in a card it's blank until I filter on a row, then it shows the value I selected. Also in a table visual the Totals do not show. how do I get this measure to calculate the entire column. I can post the end date if needed.

 

SUMX(VALUES(zMeasures),zMeasures[Duration]) 
 
Duration = 
DATEDIFF(zMeasures[StartDate],zMeasures[EndDate], DAY)
 
StartDate =
VAR _currentBk =
    MIN(FactTable[Bk.BkIndex])
VAR _currentTask =
    MIN(FactTable[Tasks.TaskIndex])
RETURN
    CALCULATE(
        MIN(FactTable[Created]),
        FILTER(
            ALL(FactTable),
            FactTable[Bk.BkIndex] = _currentBk && FactTable[Tasks.TaskIndex] = _currentTask
        )
    )
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@rixmcx59 , Based on the columns in visual or you want to group , you need try like

 

SUMX(VALUES(Fact[Column]),zMeasures[Duration])

 

SUMX(SUMMARIZE(Fact, Fact[Column1], Fact[Column2),zMeasures[Duration])

 

or

 

SUMX(Fact,zMeasures[Duration])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
rixmcx59
Helper V
Helper V

Thank you, the SUMX(VALUES( DAX worked for me and returned the correct number. However after checking the result I found a serious flaw in my Start and Finish DAX formulas. My model assumed that each customer would progress through the buckets in order like Phase 0 to 5 and possibly go into Backlog or No Response. The problem is the created date does not represent a bucket change 100% of the time. I need to group by bucket then capture the MIN and MAX date, which is not happening, the records in Bold/Red are being ignored in my DAX measures. Thanks for any help.

 

IDTaskBucketStartEndDurationCreated
1CustomerDPhase 01/12/20231/18/202361/12/2023
2CustomerDPhase 02/9/20232/26/2023172/9/2023
3CustomerDPhase 21/18/20232/9/2023221/18/2023
4CustomerDPhase 32/27/20233/12/2023132/27/2023
5CustomerDPhase 32/26/20233/12/2023142/26/2023
6CustomerDPhase 43/20/20235/2/2023433/20/2023
7CustomerDPhase 43/12/20235/2/2023513/12/2023
8CustomerABacklog1/12/20232/8/2023271/12/2023
9CustomerANo Response4/13/20235/2/2023194/13/2023
10CustomerAPhase 02/27/20233/8/202392/27/2023
11CustomerAPhase 02/8/20233/8/2023282/8/2023
12CustomerAPhase 33/8/20234/13/2023363/8/2023
amitchandak
Super User
Super User

@rixmcx59 , Based on the columns in visual or you want to group , you need try like

 

SUMX(VALUES(Fact[Column]),zMeasures[Duration])

 

SUMX(SUMMARIZE(Fact, Fact[Column1], Fact[Column2),zMeasures[Duration])

 

or

 

SUMX(Fact,zMeasures[Duration])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors