cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
scabral
Helper III
Helper III

table showing min, median, and max

wondering if the following is possible to do in power bi:

 

results.PNG

 

i have a table with all of our clients with colunns for Client Reported Value and Combined Ratio.  I need to display the Min, Median, and Max for each column in the table as shown above.

 

thanks

Scott

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @scabral ,

I created some data:

vyangliumsft_0-1638495531238.png

Here are the steps you can follow:

1. Use Enter data to create a table.

vyangliumsft_1-1638495531240.png

2. Create measure.

Client_Max = MAXX(ALL('Table'),'Table'[Client reported value])
Client_Media = MEDIANX(ALL('Table'),'Table'[Client reported value])
Client_Min =
MINX(ALL('Table'),'Table'[Client reported value])
Com_Max =
MAXX(ALL('Table'),'Table'[Combined Ratio])
Com_Media =
MEDIANX(ALL('Table'),'Table'[Combined Ratio])
Com_Min =
MINX(ALL('Table'),'Table'[Combined Ratio])
Measure_Client report value =
SWITCH(
    TRUE(),
    MAX( Table2[Group])="Max",[Client_Max],
    MAX( Table2[Group])="Min",[Client_Min],
    MAX( Table2[Group])="Median",[Client_Media])
Measure_Combined Ratio =
SWITCH(
    TRUE(),
    MAX( Table2[Group])="Max",[Com_Max],
    MAX( Table2[Group])="Min",[Com_Min],
    MAX( Table2[Group])="Median",[Com_Media])

3. In Power query, Add Column – Index Column From 1.

vyangliumsft_2-1638495531243.png

4. Select [Group] of Table2, click Column tools – Sort by – Index

vyangliumsft_3-1638495531244.png

5. Result:

vyangliumsft_4-1638495531245.png

Best Regards,

Liu Yang

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

View solution in original post

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @scabral ,

I created some data:

vyangliumsft_0-1638495531238.png

Here are the steps you can follow:

1. Use Enter data to create a table.

vyangliumsft_1-1638495531240.png

2. Create measure.

Client_Max = MAXX(ALL('Table'),'Table'[Client reported value])
Client_Media = MEDIANX(ALL('Table'),'Table'[Client reported value])
Client_Min =
MINX(ALL('Table'),'Table'[Client reported value])
Com_Max =
MAXX(ALL('Table'),'Table'[Combined Ratio])
Com_Media =
MEDIANX(ALL('Table'),'Table'[Combined Ratio])
Com_Min =
MINX(ALL('Table'),'Table'[Combined Ratio])
Measure_Client report value =
SWITCH(
    TRUE(),
    MAX( Table2[Group])="Max",[Client_Max],
    MAX( Table2[Group])="Min",[Client_Min],
    MAX( Table2[Group])="Median",[Client_Media])
Measure_Combined Ratio =
SWITCH(
    TRUE(),
    MAX( Table2[Group])="Max",[Com_Max],
    MAX( Table2[Group])="Min",[Com_Min],
    MAX( Table2[Group])="Median",[Com_Media])

3. In Power query, Add Column – Index Column From 1.

vyangliumsft_2-1638495531243.png

4. Select [Group] of Table2, click Column tools – Sort by – Index

vyangliumsft_3-1638495531244.png

5. Result:

vyangliumsft_4-1638495531245.png

Best Regards,

Liu Yang

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

amitchandak
Super User
Super User

@scabral , This is measure to measure to dimension split. You need to have a table with all required filters of view by and use that in visual

 

union(
summarize('Table',"Measure","Client Report Value","Min",[Min Client Report Value],"Median",[MedianClient Report Value],"Max",[MaxClient Report Value]),
summarize('Table',"Measure","Combined Ratio","Min",[Min Combined Ratio],"Median",[MedianCombined Ratio],"Max",[Max Combined Ratio])
)

 

Assume already have these measures

 

Similar example

union(
summarize('Table',"Measure","Min","Test1",min('Table'[Test1]),"Test2",min('Table'[Test2]),"Test3",min('Table'[Test3]))
summarize('Table',"Measure","Max","Test1",max('Table'[Test1]),"Test2",max('Table'[Test2]),"Test3",max('Table'[Test3]))
)
"QTD" , "YTD" , "MTD"

union(
summarize('Table',"Measure","sales","This period",[SALES YTD],"Last period",[SALES LYTD],"POP",[SALES YOY])
summarize('Table',"Measure","unit","This period",[unit YTD],"Last period",[unit LYTD],"POP",[unit YOY])
)

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
!! Subscribe to my youtube Channel !!

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Power BI Dev Camp Session 22 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!