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.
Hi everyone!
My data looks like this:
Item | Status |
1.1 | yes |
1.1 | yes |
1.1 | no |
1.2 | yes |
1.3 | no |
1.3 | yes |
1.4 | yes |
1.4 | yes |
I want to count the the item if every status in the second column for certain item equals yes.
For example, for the above table it would count 1.2 and 1.4.
Thanks in advance.
Solved! Go to Solution.
Hey @Anonymous ,
You may try this:
Count =
VAR _FIlter =
SUMMARIZECOLUMNS('Table'[Item],
"No Count",COUNTROWS(FILTER('Table','Table'[Status] = "No")),
"Yes Count",COUNTROWS(FILTER('Table','Table'[Status] = "Yes"))
)
VAR _Count =
CALCULATE(
DISTINCTCOUNT('Table'[Item]), FILTER(_FIlter, [No Count] = 0))
RETURN
_Count
Cheers!
Vivek
If it helps, please mark it as a solution. Kudos would be a cherry on the top 🙂
If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)
Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter
@Anonymous , Try this measure with item
countx(filter(summarize(Table, Table[Item], "_1", count(table[Status]), "_2" , calculate(count(table[Status]), table[Status] ="yes")), [_1]=[_2]),[Item])
Hey @Anonymous ,
You may try this:
Count =
VAR _FIlter =
SUMMARIZECOLUMNS('Table'[Item],
"No Count",COUNTROWS(FILTER('Table','Table'[Status] = "No")),
"Yes Count",COUNTROWS(FILTER('Table','Table'[Status] = "Yes"))
)
VAR _Count =
CALCULATE(
DISTINCTCOUNT('Table'[Item]), FILTER(_FIlter, [No Count] = 0))
RETURN
_Count
Cheers!
Vivek
If it helps, please mark it as a solution. Kudos would be a cherry on the top 🙂
If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)
Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter
It just gives me the count of yes in the second column. I want to count items with all yes in status.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |