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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
krzysztof
Helper III
Helper III

DAX - one of the categories is to be counted differently


Please help.
I want to set the values ​​in the table for the category, but one of the categories should show the data in a different way.

1.PNG

 

 

2.PNG

 

 

 

https://drive.google.com/open?id=1nAzp2nEidn85rzOzDEEwKGGDJcrZiObX

1 ACCEPTED SOLUTION

@krzysztof 

 

Sorry I was away.

 

Do you mean correct Total?

 

In that case, you add a new MEASURE referencing previous measure

Please see your amended fiel attached

 

Measure 2 =
IF (
    HASONEFILTER ( 'Table'[Category] ),
    [Measure],
    SUMX ( VALUES ( 'Table'[Category] ), [Measure] )
)

ky.png

View solution in original post

4 REPLIES 4
Zubair_Muhammad
Community Champion
Community Champion

@krzysztof 

 

You can use this MEASURE

 

Measure =
VAR maxmonth =
    MAX ( 'Table'[Month] )
RETURN
    IF (
        SELECTEDVALUE ( 'Table'[Category] ) = "AU",
        CALCULATE ( SUM ( 'Table'[value] ), 'Table'[Month] = maxmonth ),
        SUM ( 'Table'[value] )
    )

 

@Zubair_Muhammad I hope you understand me 🙂

@krzysztof 

 

Sorry I was away.

 

Do you mean correct Total?

 

In that case, you add a new MEASURE referencing previous measure

Please see your amended fiel attached

 

Measure 2 =
IF (
    HASONEFILTER ( 'Table'[Category] ),
    [Measure],
    SUMX ( VALUES ( 'Table'[Category] ), [Measure] )
)

ky.png

thank you. And how to have all categories in the table plus categories with your calculations?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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