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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
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.