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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
MarkusEng1998
Resolver II
Resolver II

Dashboard to compare Vendor to Global Average

I want to recreate a Smartsheet dashboard in PowerBI where I can use a slicer for selecting the vendor. The dashboard will have bar graphs comparing the values of the global average (all of the vendors) to the selected vendor. Currently the source table has each vendor record as a row, including a row for the global average. Please advise how I need to restructure the data so that the global average will be one of the two rows in the dashboard.

 

Dashboard.jpg

 

 Thank you for any suggestions!

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

Hi  @MarkusEng1998 ,

Do you want to select some Vendor on the bar chart, one line shows this Vendor, and the other line shows Global Average for comparison?

I created some data:

vyangliumsft_0-1666232787370.png

Here are the steps you can follow:

1. Create calculated table.

Table 2 =
DISTINCT('Table'[vendor])

2. Create measure.

Measure =
SUMX(FILTER(ALL('Table'),'Table'[vendor]="Global Average"),[Amount])
Flag =
var _select=SELECTCOLUMNS('Table 2',"1",[vendor])
return
IF(
    MAX('Table'[vendor]) in _select &&MAX('Table'[vendor])<>"Global Average",1,0)

3. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_1-1666232787371.png

4. Result:

vyangliumsft_2-1666232787380.png

If not your expected result, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

If you need pbix, please click here.

 

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
MarkusEng1998
Resolver II
Resolver II

Thank you very much, Liu! This is what I need.

 

v-yangliu-msft
Community Support
Community Support

Hi  @MarkusEng1998 ,

Do you want to select some Vendor on the bar chart, one line shows this Vendor, and the other line shows Global Average for comparison?

I created some data:

vyangliumsft_0-1666232787370.png

Here are the steps you can follow:

1. Create calculated table.

Table 2 =
DISTINCT('Table'[vendor])

2. Create measure.

Measure =
SUMX(FILTER(ALL('Table'),'Table'[vendor]="Global Average"),[Amount])
Flag =
var _select=SELECTCOLUMNS('Table 2',"1",[vendor])
return
IF(
    MAX('Table'[vendor]) in _select &&MAX('Table'[vendor])<>"Global Average",1,0)

3. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_1-1666232787371.png

4. Result:

vyangliumsft_2-1666232787380.png

If not your expected result, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

If you need pbix, please click here.

 

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

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.