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
Ritaf
Responsive Resident
Responsive Resident

Dynamic classification by measure

Hi,
I have a purchases table and suppliers table and want to classify every supplier by the value of purchases dynamically depending on the selected period.
I tried to add a calculated column to a suppliers table with the formula:

clasification = SWITCH(true(),
[totalValue] >0 && [totalValue] <45, "A",
[totalValue] >46 && [totalValue] <65,"B","C")
but it works staticly, how can i change the solution for dynamic?
sample file:
sample File 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the attached pbix file.

I created a measure like below, and inserted into the table visualization.

 

clasification measure: =
IF (
    [totalValue] <> BLANK (),
    SWITCH (
        TRUE (),
        [totalValue] > 0
            && [totalValue] < 45, "A",
        [totalValue] > 46
            && [totalValue] < 65, "B",
        "C"
    )
)

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.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the attached pbix file.

I created a measure like below, and inserted into the table visualization.

 

clasification measure: =
IF (
    [totalValue] <> BLANK (),
    SWITCH (
        TRUE (),
        [totalValue] > 0
            && [totalValue] < 45, "A",
        [totalValue] > 46
            && [totalValue] < 65, "B",
        "C"
    )
)

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.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

Hi Kim, I have the similar scenario, however my table will contain only classification & measures(i.e., totals, %), but not the other Grouped fields (i.e., here the supplier name & year). When Im removing the supplier name & year from the given dashboard the classification is defaulting to "C". Any suggestions please....

Ritaf
Responsive Resident
Responsive Resident

Thank you!

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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.