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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Calculating measure based on column groupings

Hi everyone!

 

I'm trying to calculate a measure based on column groupings but unsure how to make it work when aggregated as currently I'm using MIN which won't be correct when aggregated.

 

IF( MIN([Grouping]) = "Include", IF( [Years] >=1, [logic if true], IF( MIN[Grouping) = "Exclude",  IF( [Years >= 1, [logic if true], [logic if false]))

 

How can I make this work for the aggregated value?

 

The data is structured like this

GroupingValueYears
Include1231
Include3451.4
Exclude1235.3
Exclude8572.3
Exclude1236.5

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , This type of formula should work

Switch( True() ,
Min([Grouping]) = "Include" && min([Years]) >=1, [logic if true] ,
MIN([Grouping]) = "Exclude" && min([Years]) >= 1 ,[logic if true] ,
[logic if false]
)

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , This type of formula should work

Switch( True() ,
Min([Grouping]) = "Include" && min([Years]) >=1, [logic if true] ,
MIN([Grouping]) = "Exclude" && min([Years]) >= 1 ,[logic if true] ,
[logic if false]
)

Anonymous
Not applicable

Thanks!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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