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
xRTP
Helper V
Helper V

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

@xRTP , 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

 

Tried this and still got the same error

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.