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.
Hello!
My table is the following:
Product ID | ICD Number |
1 | I45 |
1 | I46 |
1 | |
2 | I45 |
3 | I46 |
4 |
My desired output should be the following.
4 |
So the second table should only contain the product numbers that have no ICD number assocated with it which is Product ID 4 in this case.
Hi @Anonymous ,
According to my understanding, you want to display the Product ID whose ICD Number is blank, right?
You could use the following formula:
ICDFlag =
IF ( ISBLANK ( SELECTEDVALUE ( 'Table'[ICD] ) ), 0, 1 )
sumFlag =
IF (
CALCULATE (
SUMX ( 'Table', [ICDFlag] ),
ALLEXCEPT ( 'Table', 'Table'[Product ID] )
) = 0,
1,
0
)
My visualization looks like this:
Is the result what you want? If you have any questions, please upload some data samples and expected output.
Please do mask sensitive data before uploading.
Best Regards,
Eyelyn Qin
@Anonymous , try like
selectcolumns(filter(summarize(table, table[Product ID], "ICD",calculate(count(Table[Product ID]),not(isblank(Table[ICD Number])))
, "ICD1",calculate(count(Table[Product ID]),isblank(Table[ICD Number]))), isblank([ICD]) && not(isblank([ICD1]))) ,"Product ID",[Product ID])
@Anonymous
you can try to create a new table
Table 2 =
var tbl=SUMMARIZE('Table','Table'[productID],"COUNT",CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[ICD Number]<>"")))
return SELECTCOLUMNS(FILTER(tbl,ISBLANK([COUNT])),"productID",'Table'[productID])
Proud to be a Super User!
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 |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |