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

Formula not displaying on granular level

My formular below works on total level but does not work on granular level. 
I think the issue is under Class there is Headcount. 

CPH Actual = iferror(CALCULATE([Actual],Account[Sub Class]="People")/CALCULATE([Avg. Actual People]),0)

datagorillagirl_0-1664522307671.png
3 REPLIES 3
v-yiruan-msft
Community Support
Community Support

Hi  @datagorillagirl ,

Whether your problem has been resolved? If yes, could you please mark the helpful post as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yiruan-msft
Community Support
Community Support

Hi @datagorillagirl  ,

You can create another new measure as below and put this new measure to replace the original measure onto the measure visual as below screenshot...

Note: The groupby fields are from the fields marked with red lines in the screenshot below...

New measure =
SUMX (
    GROUPBY (
        Account,
        Account[Class],
        Account[Sub Class],
        Account[fieldname1],
        Account[fieldname2]
    ),
    [CPH Actual]
)

yingyinr_1-1664790344824.png

 

In addition, you can refer the following links to try to solve your problem...

Why Your Total Is Incorrect In Power BI - The Key DAX Concept To Understand

Dax for Power BI: Fixing Incorrect Measure Totals

 

If the above one can't help you get the desired result, please provide some sample data in your table Account (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
VahidDM
Super User
Super User

Hi @datagorillagirl 

Try this:

CPH Actual =
VAR _A =
    CALCULATE ( [Actual], KEEPFILTERS ( Account[Sub Class] = "People" ) ) / [Avg. Actual People]
RETURN
    IFERROR ( _A, 0 )

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

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.