Forum Discussion
Formula for gauge visual
Hello Community = I am trying to create a measure/column that would isolate just the Row A from below.
I need to compare Row A's percent value against a KPI target (I will use a gauge visual). I have created the simple Target measure. But am wondering how to create the formula that would go in the value area of the gauge visual. So essentially what I need to end up with a gauge visual that shows we are at 71.10% relative to a 95% target.
- Anonymous5 years ago
Hi Anonymous
I think your Total Shipments and % of Total are all measures.
Due to I don't know your data model, I build a sample to have a test.
My sample:
Measure = DISTINCTCOUNT('Flu Shipped by Order Date'[Order])Total Shippments = SUMX(VALUES('Flu Shipped by Order Date'[Type]),[Measure])%Total = [Total Shippments]/SUMX(ALL('Flu Shipped by Order Date'[Type]),[Measure])A percentage = CALCULATE([%Total],FILTER('Flu Shipped by Order Date','Flu Shipped by Order Date'[Type] = "A. Four Days or Less"))Target = 0.95Result is as below.
You can download the pbix file from this link: Formula for gauge visual
If this reply still couldn't help you solve your problem, please share a sample with me by your Onedrive for Business.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- PhilipTreacySuper User
Hi Anonymous
Didn't I already answer this here?
Working with the Gauge visual - Microsoft Power BI Community
If you needed further help you should just post in that first topic rather than start another one.
regards
Phil
- PhilipTreacySuper User
Anonymous
Please provide your PBIX.
Phil
- AnonymousNot applicable
Hi Anonymous
I think your Total Shipments and % of Total are all measures.
Due to I don't know your data model, I build a sample to have a test.
My sample:
Measure = DISTINCTCOUNT('Flu Shipped by Order Date'[Order])Total Shippments = SUMX(VALUES('Flu Shipped by Order Date'[Type]),[Measure])%Total = [Total Shippments]/SUMX(ALL('Flu Shipped by Order Date'[Type]),[Measure])A percentage = CALCULATE([%Total],FILTER('Flu Shipped by Order Date','Flu Shipped by Order Date'[Type] = "A. Four Days or Less"))Target = 0.95Result is as below.
You can download the pbix file from this link: Formula for gauge visual
If this reply still couldn't help you solve your problem, please share a sample with me by your Onedrive for Business.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.