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

Default line chart Behavior

I am trying to make dashboard have a score card and a line with two other componenets, i am facing issue, if there is no selection of a country on wordcloud or on the map, the score card shows first value Argentina on card but the value underneath is the average value, and the line chart shows country name as Argentina and the line on the chart is the average of the data. how to handle this issue? why didnt score card and line chart shows the data of the Argentina?

here is the default behavior snapshot:

Ahmad7886_0-1707889598550.png

however the desired is:

Ahmad7886_1-1707889623852.png

 

 

 

 

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

Hi @Ahmad7886 ,

Based on your description, the scorecard seems to show data for Argentina by default, but when no country/region is selected, the line graph displays the average instead of Argentina-specific data. There are several steps you can take to troubleshoot and resolve this inconsistency:

 

1. You can create a metric that you can use to check if a country/region is selected, and if it is not, it defaults to data for Argentina. Use this metric as a filter for scorecards and line charts to make sure they show the same data.
Here is an example of a DAX formula you might use:

SelectedCountry = IF(ISFILTERED('YourTable'[Country]), MAX('YourTable'[Country]), "Argentina")

 

2. Make sure the slicers are properly synchronised. When a selection is made on one slicer, it should be reflected on all other visual objects.
You can use the Edit Interactions feature in Power BI to manage how selections in one visual object affect other visual objects:

Use report themes in Power BI Desktop - Power BI | Microsoft Learn

 

3. Check if there are any default settings or filters applied to the line charts that may cause the line charts to show the average value instead of the data for a particular country/region.

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

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

1 REPLY 1
v-yifanw-msft
Community Support
Community Support

Hi @Ahmad7886 ,

Based on your description, the scorecard seems to show data for Argentina by default, but when no country/region is selected, the line graph displays the average instead of Argentina-specific data. There are several steps you can take to troubleshoot and resolve this inconsistency:

 

1. You can create a metric that you can use to check if a country/region is selected, and if it is not, it defaults to data for Argentina. Use this metric as a filter for scorecards and line charts to make sure they show the same data.
Here is an example of a DAX formula you might use:

SelectedCountry = IF(ISFILTERED('YourTable'[Country]), MAX('YourTable'[Country]), "Argentina")

 

2. Make sure the slicers are properly synchronised. When a selection is made on one slicer, it should be reflected on all other visual objects.
You can use the Edit Interactions feature in Power BI to manage how selections in one visual object affect other visual objects:

Use report themes in Power BI Desktop - Power BI | Microsoft Learn

 

3. Check if there are any default settings or filters applied to the line charts that may cause the line charts to show the average value instead of the data for a particular country/region.

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

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.