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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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