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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Dax sum only the "True" results of boolean

Hello, im trying to sum all the items that was fall under the "True" statement. Ive already have a measure that will calculate the score so if the employee pass the metric he got 5 else 0 on each metrics and that measure was names "S.(measurename)". However, some of my calculations have Year to date calculation from quick measure and im getting this error.

"Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."

 
Here's my code below:
 
Test Total = CALCULATE(SUMX('Main Table', IF(
    OR(ISBLANK([S.Timeliness]), [S.Timeliness]<>0) &&
    OR(ISBLANK([S.Quality]), [S.Quality]<>0) &&
    OR(ISBLANK([S.Compliance]), [S.Compliance]<>0) &&
    OR(ISBLANK([S.Efficiency]), [S.Efficiency]<>0) &&
    OR(ISBLANK([S.Prod Util]), [S.Prod Util]<>0) &&
    OR(ISBLANK([S.CSM]), [S.CSM]<>0) &&
    OR(ISBLANK([S.KSM]), [S.KSM]<>0) &&
    OR(ISBLANK([S.OT Reduction]), [S.OT Reduction]<>0) &&
    OR(ISBLANK([S.Coaching]), [S.Coaching]<>0) &&
    OR(ISBLANK([S.Succession Plan]), [S.Succession Plan]<>0) &&
    OR(ISBLANK([S.Unmanaged]), [S.Unmanaged]<>0) &&
    OR(ISBLANK([S.Career Dev]), [S.Career Dev]<>0) &&
    OR(ISBLANK([S.Leadership Dev]), [S.Leadership Dev]<>0) &&
    OR(ISBLANK([S.Managed]), [S.Managed] <> 0),

    1,
    0

)))
 
Badly need help thanks in advance!
3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , this measure is not using time intelligence. Seem like it should work

 

for TI

 

you can try like

 

calculate([Test Total], datesytd(Date[Date]))

 

or

calculate(Sumx(values(Date[Date]) , [Test Total], datesytd(Date[Date]))

 

You should use the date table joined with the date column of your table

 

Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

 

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
Anonymous
Not applicable

Tried this and still got the same error

Anonymous
Not applicable

Hello thanks for the reply, but i dont have any date table, the dates are already part of the raw data. Is it gonna work?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.