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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Gingerjeans88
Helper IV
Helper IV

Help with measures

Hi all,

I have a list of Quotes, multiple rows per QuoteID as a new row is added every time the Quote moves to a new stage.

My overall visualisation requirement is to show the percentage of quotes, per month, that were less than or equal to the total SLA minutes of 1020. Plus the volume of quotes. So a column and line chart.
(I have a calculated column for the total minutes.)

Is my best option to add all quote IDs as values to the chart, then run a measure of the top counting how many were within the SLA minutes and then show that as a percentage? I’m struggling with how to do that in a measure, perhaps lack of practice with DAX and no appropriate quick measure option!

Table for ref as I am not authorised to share the pbix.

QuoteID name Total minutes Date
ABC123 200 Oct
DEF456 1400. Oct
GHI789 350. Oct

Total within SLA would be 2, so 66% within SLA and the volume (which I’ll display as the line) is 3.

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

Try these measures

Total Volume = COUNTROWS(Data)

Number of quotes = DISTINCTCOUNT(Data[QuoteID])

Number of quotes within SLA = CALCULATE([Number of quotes],Data[Total minutes]<=1020)

Number of quotes within SLA = [Number of quotes within SLA]/[Number of quotes]

Format the last measure as a %.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur ,

 

Thank you SO much for your help. Presumably I apply them all onto the visualisation at once?

Also I am now concerned that my Total Minutes calculated column in the dataset isn't correct, as it's totalling the minutes per row and some row are duplicates...so the count distinct will be skewed. 

 

Would it be ok if I sent you a dummy PBIX to look at for me?

Hi,

You are welcome.  My solution proposes the usage of measures only - no calculated columns at all.  Please retry.  If it still does not work, share the link from where i can download your PBI file.  In there, show me the exact result which you are expecting.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur ,

 

Thanks again for your reply - unfortunately I am unable to link to my pbix as it contains personal data, but I have recreated sort of what the dataset looks like and will explain what I want. 

 

As you can see from the below, my Total Minutes is not useful as it totals per line, and I want to total minutes by QuoteID. 

So for QUO001 I want the value to be 1103. 

 

My column and line chart is to show the percentage of total (distinct, so that each line item isn't counted as a quote) quotes for a month that took less than or equal to 1020 minutes. Line value will be the total distinct quotes volume.

 

Per the below, I would expect to see only one item in the bar chart for November, as the 1103 exceeds the SLA, and for October I want to see two (not all six line items). 

 

How do I get a measure to count distinct rows, referencing the sum of my total minutes column??

QuoteID NameCreated OnStageStage StartStage EndStage 1 Duration (calculated, if stage equals 1)Stage 2 Duration (calculated, if stage equals 2)Stage 3 Duration (calculated, if stage equals 3)Stage 4 Duration (calculated if stage equals 4)

Total Minutes

(calculated, stage 1 + 2 + 3 + 4)

QUO00120/11/2019120/11/2019 11:0020/11/2019 23:00720   720
QUO00120/11/2019221/11/2019 08:0021/11/2019 14:00 360  360
QUO001 20/11/2019321/11/2019 14:0221/11/2019 14:05  3 3
QUO001 20/11/2019421/11/2019 14:10 21/11/2019 14:30   2020
QUO00201/11/2019101/11/2019 10:0001/11/2019 10:022   2
QUO00201/11/2019201/11/2019 10:1001/11/2019 10:30 20  20
QUO00330/10/2019130/10/2019 09:0531/10/2019 09:2823   23
QUO00330/10/2019230/10/2019 09:3030/10/2019 10:00 30  30
QUO00330/10/2019330/10/2019 10:1030/10/2019 10:15  5 5
QUO00330/10/2019430/10/2019 10:2330/10/2019 10:30   77
QUO00512/10/2019112/10/2019 13:3012/10/2019 14:0030   30
QUO00512/10/2019212/10/2019 14:1012/10/2019 14:25 15  15

 

Hi,

I am still not clear with your requirement.  Only one column should show up for November because the total minutes exceed the SLA of 1020.  For October, nothing should show up because there is no Quote which exceeds the SLA of 1020.  You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

HI @Ashish_Mathur ,

 

I have given this some more thought. All I need to do is calculate the sum of the 'total minutes' per unique ID and show which quotes are less than or equal to the desired total minutes (1020). 

 

In other words, show me each record only once in the chart, but only if the sum of the 'total minutes' value for each row with that unique ID is less than or equal to 1020. Help! Losing my mind haha!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors