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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Syndicate_Admin
Administrator
Administrator

Duda with chart based on display table

Good morning

I'm new to this forum and relatively also with PowerBI.

I have some data in excel of this type that obeys a survey:

cgs78_0-1732606595890.png

I need to create a report with a filter by country, a table, and a graph.

In the visualization table I must show for each city and district the mode, that is, for Ciudad_1 and Distrito_11 0 must come out Unsatisfactory, for Ciudad_1 and District _12 when there is a "tie" between 0 Unsatisfactory and 1 Improvable, 0 must come out which is the one with the lowest score between 0 and 1, and so for the others.

The chart should show the same as the display table, i.e., it should be based on the calculated mode measure and not on the data in excel. But I haven't managed to get the graph to show the same thing from the table, it's showing what's in the excel.

The "Score by City District" table correctly reflects the points fashion for each city and district.

But the graph "Evolution of the score by district and city" shows the values of the excel and not what the table Score by district city shows.

I think it's because the table is at the City-District level, while the graph is at the total level, but I don't know how to put the graph at the City-District level as well.

cgs78_1-1732606765956.png

Please, could you help?

Thanks a lot

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

Hi, @Syndicate_Admin 

Based on your information, I create a sample table:

vyohuamsft_0-1732681543390.png

You can create a new measure, try the following dax expression:

MaxScorePerDistrictMeasure = 
CALCULATE(
    MIN('Table'[PUNTOS]),
    ALLEXCEPT('Table', 'Table'[Country], 'Table'[City], 'Table'[District])
)

 Then create visuals and put fields in them, here is my preview:

vyohuamsft_1-1732681856019.png

 

How to Get Your Question Answered Quickly

Best Regards

Yongkang Hua

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
Syndicate_Admin
Administrator
Administrator

Thank you for the help, it helped me to solve it!

v-yohua-msft
Community Support
Community Support

Hi, @Syndicate_Admin 

Based on your information, I create a sample table:

vyohuamsft_0-1732681543390.png

You can create a new measure, try the following dax expression:

MaxScorePerDistrictMeasure = 
CALCULATE(
    MIN('Table'[PUNTOS]),
    ALLEXCEPT('Table', 'Table'[Country], 'Table'[City], 'Table'[District])
)

 Then create visuals and put fields in them, here is my preview:

vyohuamsft_1-1732681856019.png

 

How to Get Your Question Answered Quickly

Best Regards

Yongkang Hua

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

Helpful resources

Announcements
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.