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
decarsul
Helper IV
Helper IV

Visual: Count of ID by a shared label

Gday all,

 

I'm trying to create a sort of combination line graph, where i have 2 lines showing the count of ID's, where the horizontal Axis is actually based on a value calculated on the same row.

I want to be able to see the difference between the 2, the 2nd column has a correction to it and i want to monitor what effect the correction has.

 

So the lines individually are count of ID by column 1 and 2. Where the lines are also column 1 and 2.

 

A simple sample:

 

 

ID	throughput 1	throughput 2
1588	1	0
1590	2	1
1592	3	2
1594	4	3
1596	5	4
1598	6	5
1600	7	6
1602	8	7
1604	9	8
1606	10	9
1608	6	5
1610	7	6
1612	8	7
1614	9	8
1616	10	9
1618	11	10
1620	12	11
1622	13	12
1624	14	13
1626	15	14
1628	16	15
1630	17	16
1632	18	17

 

I know i can simply create a 2ndary table, where i can count unique id's per value, and create a column as the axis. But there has to be a simpler way?

 

i hope i made it clear, cause i'm noticing myself i'm having issues explaining it.

Any help is appreciated.

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

Hi, @decarsul 

According to your description, I can roughly understand what you want to get, I think you can achieve this using two measures, you can try my steps:

  1. Create two measures:
Count of 1 =

CALCULATE(DISTINCTCOUNT('sample'[ID]),FILTER(ALL('sample'),[throughput 1]=MAX([throughput 1])))
Count of 2 =

CALCULATE(DISTINCTCOUNT('sample'[ID]),FILTER(ALL('sample'),[throughput 2]=MAX([throughput 1])))
  1. Create a line chart and place it like this:

v-robertq-msft_0-1617765063786.png

 

And I guess you can get what you want.

You can download my test pbix file here

 

If this result is not what you want, you can post your expected result so that we can help you in advance.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

4 REPLIES 4
v-robertq-msft
Community Support
Community Support

Hi, @decarsul 

According to your description, I can roughly understand what you want to get, I think you can achieve this using two measures, you can try my steps:

  1. Create two measures:
Count of 1 =

CALCULATE(DISTINCTCOUNT('sample'[ID]),FILTER(ALL('sample'),[throughput 1]=MAX([throughput 1])))
Count of 2 =

CALCULATE(DISTINCTCOUNT('sample'[ID]),FILTER(ALL('sample'),[throughput 2]=MAX([throughput 1])))
  1. Create a line chart and place it like this:

v-robertq-msft_0-1617765063786.png

 

And I guess you can get what you want.

You can download my test pbix file here

 

If this result is not what you want, you can post your expected result so that we can help you in advance.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

so simple, but i was completely stumped. 

Thanks a ton!

PhilipTreacy
Super User
Super User

Hi @decarsul 

Sorry,not following what yuo want to do.

The counts go from 10/9 to 6/5 -why is this occurring?

Can you please try explaining again what you want, maybe with an example of an expected result.

Thanks

Phl



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


i will try.

 

I have unique id's, say customers with a complaint, i want to measure the throughput time of their complaint untill it has been resolved. This part represents throughput 1.

In throughput 2, i deduct the time from throughput 1 where we had to wait for the customer to respond during the incident. This would result into a netto throughput time that we are accountable for.

 

So incase of ID 1590. The total throughput time was 2 hours. But the Netto throughput time was 1 hour, meaning we have deducted 1 hour in which we were waiting for the customer to respond back to us.

 

Now i have these 2 results, a netto and a total throughput time. And i want to show them side by side in the same line graph, where the horizontal axis is the netto / total throughput time, and the vertical axis is the amount of id's counted by interval, where the interval is the bruto and total throughput. 

 

Now i have already accomplished the same result by creating a new table with a value of 1 - 500, where i count the amount of id's that are equal to the value of throughput 1 for 1 column, and the same but for throughput 2. But i really am wondering if that is at all needed.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.