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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Grand total measure is 0 for IF forumla with 0 and 1 as results

Hello,

I'm stuck to the following issue. I need to count how many salesreps are really active regarding that rule : a salesrep who is active is a salesrep who detected at least the same amount of opportunities as his objective.

To do this I did the following mesure:

Actif IC 1 = IF([Nbre Opp]-[Obj. IC]<0 || ISBLANK([Nbre Opp]);0;1)

"Nbre Opp"= number of opportunities detected.

"Obj. IC" number of expected detected opportunies.

The formula works well but the problem is that the total in a table is 0 so it looks like PBI considers the IF DAX formula as 0 whatever the result value is 0 or 1. Format measure is "whole number" and so far I don't see any solution to my problem...

If someone has idea I would be very happy to get some help. Thanks very much to anybody with a litlle clue 🙂

 

 Capture.JPG

5 REPLIES 5
Zubair_Muhammad
Community Champion
Community Champion

Hi @Anonymous

 

Try adding this MEASURE

 

measure =
IF (
    HASONEFILTER ( TableName[FullName] ),
    [Actif IC 1],
    SUMX ( ALLSELECTED ( TableName[FullName] ), [Actif IC 1] )
)

Regards
Zubair

Please try my custom visuals
Anonymous
Not applicable

Hi @Zubair_Muhammad,

 

Thanks for your reply. Unefortunately the total is not correct: it calculates 9 which is not correct 😞

 

Capture.JPG

@Anonymous

 

How about this one

 

measure =
IF (
    HASONEFILTER ( TableName[FullName] ),
    [Actif IC 1],
    SUMX (
        SUMMARIZE (
            ALLSELECTED ( Table ),
            TableName[Month],
            TableName[Activite IC],
            TableName[FullName]
        ),
        [Actif IC 1]
    )
)

Regards
Zubair

Please try my custom visuals
Anonymous
Not applicable

@Zubair_Muhammad

 

not applicable as what you see comes from different tables. Maybe I should be more precise.

- "month" comes from DimDate table (generated with calendar auto fx)

- "activité IC" comes from DimUser table

- "full name" comes from DimUser table

 

I tried to start from you last formula and readapt a little but without any sucess. And as I'm beginning with PBI and discovering DAX, it's quiet difficult...

Anonymous
Not applicable

Does someone has another clue. It really seems that the measure format is considered as text but it is not. Looks so simple in theory...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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