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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

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

@Anonymous , 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])

Share with Power BI Enthusiasts: 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
Anonymous
Not applicable

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

@Anonymous , 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])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.