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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
googlogmob
Advocate II
Advocate II

How to calculate measure only for come dimantions

How to make measure SUMMA = BLUNK only for dimension "Field_C"?

 

Screenshot_3.png

6 REPLIES 6
Greg_Deckler
Super User
Super User

Not enough information, please post sample data and more detail.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler, here is Sample on Google Drive

 

And the same on screen

 

 

Screenshot_5.png

@googlogmob

May I know why you'd like to show the data that way, For me, I will create a calculated table as below.

Table =
UNION (
    SELECTCOLUMNS (
        'Лист1',
        "FieldGroup", "FieldA",
        "Field", 'Лист1'[Field_A],
        "Amount", 0
    ),
    SELECTCOLUMNS (
        'Лист1',
        "FieldGroup", "FieldB",
        "Field", 'Лист1'[Field_B],
        "Amount", 'Лист1'[Amount]
    ),
    SELECTCOLUMNS (
        'Лист1',
        "FieldGroup", "FieldC",
        "Field", 'Лист1'[Field_C],
        "Amount", 'Лист1'[Amount]
    )
)

Capture.PNG

Capture.PNG

@Eric_Zhang, thanks, it works

but maybe is way to realise it in SUMM  measure?
creating second table have some problem because there are many columns and measures in original project  


@googlogmob wrote:

@Eric_Zhang, thanks, it works

but maybe is way to realise it in SUMM  measure?
creating second table have some problem because there are many columns and measures in original project  


@googlogmob

Could you post the whole picture of your scenario, displaying data as in your original post is not usually a best practice way.

@Eric_Zhang

 

Main sense is that measure SUMM must show result only for another dimansions Field_B and Field_C, and NULL for Field_A, because the calculation of the measure SUMM can not be performed for Field_A from economic rules

 

i.e. such logic: IF dimention = Field_A THEN null ELSE SUMM

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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