Forum Discussion
Joerobert
8 years agoAdvocate V
DAX help, countrows by rox context
Hello, I am currently fighting through a DAX problem and cannot seem to come up with a solution, see below screenshot as a reference. I have a table visualization, shown in step 1, where i'm disp...
Joerobert
8 years agoAdvocate V
| Step 1 | Step 2 | Step 3 | |||||||||||
| NPT RefNo | Well Name | Time Duration | RefNo01 (count) | RefNo1 | Well Name | Time Duration | RefNo01 (count) | RefNo1 | Well Name | Time Duration (sum) | RefNo01 (count) | ||
| 1.0 | Well #1 | 5 | 1 | 1.0 | Well #1 | 5 | 1 | 1.0 | Well #1 | 15 | 1 | ||
| 1.1 | Well #1 | 5 | 2 | 1.0 | Well #1 | 5 | 2 | 1.0 | Well #2 | 5 | 2 | ||
| 1.2 | Well #1 | 5 | 3 | 1.0 | Well #1 | 5 | 3 | 2.0 | Well #2 | 5 | 3 | ||
| 1.0 | Well #2 | 5 | 4 | 1.0 | Well #2 | 5 | 4 | 3.0 | Well #2 | 5 | 4 | ||
| 2.0 | Well #2 | 5 | 5 | 2.0 | Well #2 | 5 | 5 | 1.0 | Well #3 | 5 | 5 | ||
| 3.0 | Well #2 | 5 | 6 | 3.0 | Well #2 | 5 | 6 | 2.0 | Well #3 | 10 | 6 | ||
| 1.0 | Well #3 | 5 | 7 | 1.0 | Well #3 | 5 | 7 | ||||||
| 2.0 | Well #3 | 5 | 8 | 2.0 | Well #3 | 5 | 8 | ||||||
| 2.1 | Well #3 | 5 | 9 | 2.0 | Well #3 | 5 | 9 | ||||||
| Card | Card | Card | |||||||||||
| 9 | 9 | 9 | |||||||||||
| 1RefNocount | 1RefNocount | 1RefNocount | |||||||||||
| calculated column | |||||||||||||
| REFNO1 = if( iserror(rounddown(value(wvJOBINTERVALPROBLEM[REFNO]),-1)), 00, rounddown(value(wvJOBINTERVALPROBLEM[REFNO]),0.1) ) | |||||||||||||
| Measure | |||||||||||||
| 1RefNoCount = CALCULATE( DISTINCTCOUNT(wvJOBINTERVALPROBLEM[REFNO1]), FILTER( wvWELLHEADER_wvJOB, wvWELLHEADER_wvJOB[WELLNAME] ) ) |