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.
My data looks like the following:
Shipment | Voyage | Product | Failed Tanks | Count of Failed Tanks
1000 | NA100 | A | 3D, 3E | 2
1001 | NA100 | A | 3D, 3E | 2
1002 | NA100 | A | 3D, 3E | 2
2000 | NA200 | A | 1S, 1P | 2
2001 | NA200 | B | 2S | 1
3000 | NA300 | A | N/A | 0
I want the number of failed tanks by voyage, so ideally the output would look something like the following:
Voyage | Count of Failed Tanks by Voyage
NA100 | 2
NA200 | 3
NA300 | 0
Could someone show me a way to do this please?
You'll need to re-model the dataset.
Then create a measure like
Count of Failed Tanks by Voyage = VAR cnt = CALCULATE ( DISTINCTCOUNT ( yourTable[Failed Tanks] ), FILTER ( yourTable, yourTable[Failed Tanks] <> "N/A" ) ) RETURN IF ( ISBLANK ( cnt ), 0, cnt )
=calculate(countrows(tablename),tablename[failed tanks]<>"N/A")
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 |
---|---|
108 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |