Say you have a table like the below where max margin and min margin represent the max and min of margin within the existing table:
|Country||Margin||Max Margin||Min Margin|
Is there a way to allow users to create some kind of grouping, like the "Region" column below, where max and min margin now calculate within the group?
|Country||Region||Margin||Max Margin||Min Margin|
This is one simplified example. In real case you would need to add more conditions inside the SWITCH statement.
Please refer to attached sample file with the proposed solution
I probably should've been more clear, the Region grouping does not exist in the source data. They want to be able to assign the groupings on their own and then have the calculations change.
Unfortunately, Power Bi does no have artificial intelligence features at least for now.
Please check the below picture and the attached pbix file.
It is for creating new columns in the table.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Find out more about the May 2023 update.
Share your Data Story with the Community in the Data Stories Gallery.