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
Damiax
Frequent Visitor

Group a table by some of its columns in a measure

Hi everyone,

 

I'm here to ask you whether there's the possibility to create a measure by considering a table with just some of its columns.

 

Let's assume I have Table X, with column A,B, and C.

 

A and B are dimension, with A being the master dimension and B the subgroup. C is the column measure.

 

I need to develop Measure "Flag" over this table to see whether C is above a threshold, but not for the whole table, indeed just for "A" dimension.

 

Can i get rid of B dimension "virtually", just to take into account Dimension A in my measure?

 

Thanks,

Damiano

2 REPLIES 2
v-kaiyue-msft
Community Support
Community Support

Hi @Damiax ,

 

You can create a measure for evaluating whether the aggregated value C for each A is above a threshold. For this example, assume you have a threshold value of 200.

 

 

Flag_Above_Threshold =
CALCULATE(
IF([_sum_c] > 200, ‘Above Threshold’, ‘Below Threshold’),
ALLEXCEPT('Table', 'Table'[A])
)

 

 

vkaiyuemsft_0-1713948490733.png

In this measure, the ALLEXCEPT function is used to ignore all filters except the one applied to dimension A. As you requested, this effectively ‘gets rid’ of dimension B in the calculation, and more details can be found in the documentation: ALLEXCEPT function (DAX) - DAX | Microsoft Learn.

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

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

Wilson_
Memorable Member
Memorable Member

Damiax,

 

Short answer, almost certainly yes. Can you be more specific?

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.