cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
StephShadwell
Frequent Visitor

Power BI Gauge Visual Issue

I am using the gauge visual to display a calculated measure of the rank of a score, with the max value set to the number of areas.

This seems to be working fine with some areas, but sometimes the gauge visual seems to add 1 to the calculated rank. See picture of incorrect gauge, and table above showing calculated rank.

Incorrect Rank being returnIncorrect Rank being return

However on the same series, the gauge shows the correct rank:

Correct Gauge.PNG

 

The fact that the rank returns correctly in the table, and additionally elsewhere in the report on line charts, it makes me think it is something to do with the gauge visual. Does anyone have any ideas?

6 REPLIES 6
v-shex-msft
Community Support
Community Support

Hi @StephShadwell ,

I think it should more be related to your filters you set in measure formula, it seems like its calculations only interact with specific fields. Can you please share you measure formula with some sample data? It is hard to troubleshoot your issue without any data.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi,

Just to confirm, i have checked there is no default summation happening on the rank measure, and this is greyed out to don't summarise.

 

Apologies, i realised the table i included was probably not that helpful, as it was interacting with all the filters (see a better screenshot below):

Table.PNG

 

As for the calculated rank measure, see DAX below:

Gauge - RankCalc = IF(HASONEVALUE(vLKP_LSOA11_tidy[GeographyName]), RANKX(ALL(vLKP_LSOA11_tidy[ParentGeographyName], vLKP_LSOA11_tidy[GeographyName]), [CalculatedScore], ,DESC))
 
I have set up the gauge, using the above  measure in the value field, and then the maximum is set to the sum of n (which is a column in a table joined that contains the number of areas within the geography type.
 
I have done a new table that includes the calculated score, to confirm the ranking, which confirms the ranking in the above table is correct based on the score.
Table with Score.PNG
The calculated score is being calculated using the following DAX:
CalculatedScore = IF([MeasureCode] <= 7, DIVIDE(SUM(IMDTidy[PopulationWeightedScore]), SUM(IMDTidy[Population]),0), DIVIDE(SUM(IMDTidy[PopulationWeightedScore]), SUM(IMDTidy[Population]),0) * 100)
 
I hope that helps, if you need anything else, let me know.
 
Thanks

Steph

HI @StephShadwell ,

I think it may be related to all function, can you please share pbix file with some dummy data for further test?

Notice: do mask on sensitive data before share.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

@v-shex-msft I have made a sample file available on one drive, https://1drv.ms/u/s!AsoxVmjjxqm_i0lQ96jcJK8-W7y0?e=2JULwK 

 

Thanks

 

hwegman
Resolver I
Resolver I

Hi StephShadwell,

 

Can you share how you created the gauge visual and the calculated rank?

 

I noticed your first visual displays the wrong total of rank, just like the gauge visual. I would assume that something is being summed with East of England.  Are you using a slicer to filter the data shown in your screenshots? 

 

I would also change the default summarization of rank to "Don't Summarize", because rank is something we generally do not want a total of. 

mwegener
Super User II
Super User II

Hi,

 

i think your Gauge is showing the total.

 

Please give Kudos for support.

If I answered your question, please mark my post as solution, this will also help others.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener work at KUMAVISION AG , one of the world's largest
implementation partners for Microsoft Dynamics. #
"Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website


Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

html:
Carousel MBAS ARun Part 1 768x460

MBAS 2021

Join Arun Ulagaratchagan and the Power BI team at MBAS! #MSBizAppsSummit #CommunityRocks

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!