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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Visualization in Gauge - Error in counting rows for percentage

Hi Guys, 

 

Could you please help me? I want to do something which seems simple but I don't understand the error.

 

I have 3 main status in my report called ZOE03:

  • Fully Delivered
  • Not Delivered
  • Partially Delivered
  • (I also have in the same column one callsed Not relevant for Deliverybut I dont need it so I filtered)

 

I want to show how much percent of one Sales Order was delivered. Want to do it via Gauge Visualization

So when the person click on one sales order it will appear X% Delivered, Y%Not delivered and Z% Partially Delivered

So Basically I thought it would be dividing total rows for Fully Delivered and divide by All the status in the colum. I used the formula below:

 

First I used 

Count Fully Delivered = CALCULATE(COUNTROWS(FILTER(ZOE03;ZOE03[Status]="Fully delivered")))

 

It worked out! So I tried to finalize with 

 

% Delivered  = CALCULATE([Count Fully D]/CALCULATE(COUNTROWS(ZOE03);ZOE03[Status];ALL(ZOE03;ZOE03[Status])))

 

Nothing worked and I still received the message below

 

MdxScript(Model) (4, 90) Calculation error in measure 'DeliveryPlan'[perc Measure]: Cannot convert value 'Not relev for deliv' of type Text to type True/False.

 

Any club on what to do or a better idea to make this visualization?

 

Thank you

 

 

 

1 ACCEPTED SOLUTION

Ahh, that's where it goes wrong. Turn your count fully D into a normal number.

 

Create a new measure:
%delivered = Count fully D/Total M lines

 

This will give you the % you want

View solution in original post

11 REPLIES 11

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.