Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
New to Power Bi
I am trying to count unique values (2 values) in one column based off unique values in another column. I have two columns, one is type and the other is Chargeable incident. I am trying to get a count when column type has sms and the chargeable incident column has either osha or osha_lti. With the below data, I would like to get a count of 3. There is always a vaule in the type column, but not in the chargeable column.
Thank you in advance
|
Solved! Go to Solution.
@veefly21 you can create a measure like below
Proud to be a Super User!
@veefly21 adding to @negi007 measures.
you can use below measure
1st requirement = CALCULATE(distinctCOUNT('Table'[Chargeable incident]),'Table'[Chargeable incident]="osha" || 'Table'[Chargeable incident]= "osha_lti")
2nd requirement with sms = CALCULATE(distinctCOUNT('Table'[Chargeable incident]),'Table'[Chargeable incident]="osha" ,Table'[Chargeable incident]= "osha_lti", type = "SMS" )
to get value with SMS.
Give Kudos if above solution as per your requirement.
Thanks /
Harish Mishra
Thank you. I got it to work. It was user error on my part, I was still not getting the results that you showed me. Finally got it. I am going to need a lot more pratice and learning to get better.
Thank you for your help. I have that measure that captures the total osha and osha_lti on a card. I wanted to add another card that only shows the osha and osha_lti that are assoicated with only sms. So I would have one card showing total osha and osha_lti (6) and another card showing only osha and osh_lti associated with sms (3). Tried to use calculate count with an && and a || with 2 columns and did not work. The error was due to using two columns.
@veefly21 adding to @negi007 measures.
you can use below measure
1st requirement = CALCULATE(distinctCOUNT('Table'[Chargeable incident]),'Table'[Chargeable incident]="osha" || 'Table'[Chargeable incident]= "osha_lti")
2nd requirement with sms = CALCULATE(distinctCOUNT('Table'[Chargeable incident]),'Table'[Chargeable incident]="osha" ,Table'[Chargeable incident]= "osha_lti", type = "SMS" )
to get value with SMS.
Give Kudos if above solution as per your requirement.
Thanks /
Harish Mishra
@veefly21 you can create a measure like below
Proud to be a Super User!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 65 | |
| 43 | |
| 40 | |
| 29 | |
| 19 |
| User | Count |
|---|---|
| 200 | |
| 126 | |
| 103 | |
| 71 | |
| 54 |