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

Values in graph are divided by value selected in slicer

So I have slicer of values ranging from 3-7 incremented by .1. The idea is to have a corresponding graph with a quantity be divided by whatever is selected in the slicer.

 

For example if the quantity for a certain serial number is 100 it will chart 31 if 3.1 is slected and 59 if 5.9 is selected.

 

Wondering how this can be accomplished. 

1 ACCEPTED SOLUTION

Hi @jshinnenkamp,

There is a max "Quantity by Serial Number" value for each unique serial number. Please create a measure using the formula and check it it works fine.

measure=
CALCULATE (
    MAX ( Table[Quantity by Serial Number] ),
    ALLEXCEPT ( Table, Table[Serial So] )
)
    / SELECTEDVALUE ( another_table_name[range] )

Then create a table visual, select the [Serial SO], measure as value, you will get expected result.

Best Regards,
Angelia

View solution in original post

5 REPLIES 5
v-huizhn-msft
Employee
Employee

Hi @jshinnenkamp,

You can created a measure to get the selected value in slicer, then multiply by 10, you will get the expected the result. Please create a measure using the formula below.

result=SELECTEDVALUE(slicer[value])*10

Please let me know if you have any other issue.

Best Regards,
Angelia

Sorry  I was a bit unclear. The quantity is a column so I'm looking to divide whatever the quantity is by the selected value in the slicer. My current issue is figuring out how to get the row values from the column into the measure.

 

Also the slicer values exist by themselves in a calculated table, so I'm not sure how to link the two tables together if that is needed.

Hi @jshinnenkamp,

>>My current issue is figuring out how to get the row values from the column into the measure.

Please try to use FIRSTNONBLANK() function to transfer each row as a value in measure. For example, use FIRSTNONBLANK(column,column) in a measure.

If this is still not resolve your issue, do you mind share your sample table to find out deep solution?

Best Regards,
Angelia

 The idea is to total up the quantity for each unique serial number. And then divide it by the selected value of the slicer. As you can see I have a column of Serial Numbers and of Quantity. I created that calculated column "Quantity by Serial Number" which is a running total for each unique serial number. The second image is just a datatable that I created to get the range of numbers that I want in the slicer.

 

I'm thinking I need to make a measure that gets the max value for each unique serial number in the "Quantity by Serial Number" column and divide that by my range column from the other table. I'm not sure how to go about that however.

 

Capture.PNGCapture.PNG

 

Hi @jshinnenkamp,

There is a max "Quantity by Serial Number" value for each unique serial number. Please create a measure using the formula and check it it works fine.

measure=
CALCULATE (
    MAX ( Table[Quantity by Serial Number] ),
    ALLEXCEPT ( Table, Table[Serial So] )
)
    / SELECTEDVALUE ( another_table_name[range] )

Then create a table visual, select the [Serial SO], measure as value, you will get expected result.

Best Regards,
Angelia

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.