Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi BI community,
I am struggle to figure a way to develop the following power BI visual report.
The requirement is indicate in the following diagram and the visual will look like the one on the right.
The left is the dataset structure.
The report is to count the number of claim document invoiced more than once and claim document invoice only once.
Each claim document can have one or more than one invoice document number. (i.e. invoiced one time or invoiced more than once).
It looks easy but it is not that simple.
Hope you can help with the DAX for the calculate column and measure.
Regards,
Aiyosap
Solved! Go to Solution.
Hi @aiyosap ,
Create a calculated column like this :
Invoice No Count = CALCULATE(DISTINCTCOUNT(InvoiceData[Invoice #]),ALLEXCEPT(InvoiceData,InvoiceData[Claim Doc]))
Invoiced More than Once = CALCULATE(DISTINCTCOUNT(InvoiceData[Claim Doc]),FILTER(InvoiceData,InvoiceData[Invoice No Count]>1))
Invoiced Once = CALCULATE(DISTINCTCOUNT(InvoiceData[Claim Doc]),FILTER(InvoiceData,InvoiceData[Invoice No Count]=1))
Please accept this as a solution if your question has been answered !!
Appreciate a Kudos 😀
Connect with me on LinkedIn: https://www.linkedin.com/in/jaideepnema/
Create a couple of measures
Invoiced once =
var summaryTable = ADDCOLUMNS( SUMMARIZE( 'Table', 'Table'[Claim Doc]),
"@num invoices", CALCULATE( DISTINCTCOUNT( 'Table'[Invoice #] ) )
)
return COUNTROWS( FILTER( summaryTable, [@num invoices] = 1 ) )
Invoiced more than once =
var summaryTable = ADDCOLUMNS( SUMMARIZE( 'Table', 'Table'[Claim Doc]),
"@num invoices", CALCULATE( DISTINCTCOUNT( 'Table'[Invoice #] ) )
)
return COUNTROWS( FILTER( summaryTable, [@num invoices] > 1 ) )
Hi @aiyosap ,
Create a calculated column like this :
Invoice No Count = CALCULATE(DISTINCTCOUNT(InvoiceData[Invoice #]),ALLEXCEPT(InvoiceData,InvoiceData[Claim Doc]))
Invoiced More than Once = CALCULATE(DISTINCTCOUNT(InvoiceData[Claim Doc]),FILTER(InvoiceData,InvoiceData[Invoice No Count]>1))
Invoiced Once = CALCULATE(DISTINCTCOUNT(InvoiceData[Claim Doc]),FILTER(InvoiceData,InvoiceData[Invoice No Count]=1))
Please accept this as a solution if your question has been answered !!
Appreciate a Kudos 😀
Connect with me on LinkedIn: https://www.linkedin.com/in/jaideepnema/
@aiyosap , Try a new measure like
countx(filter(Table, Table[ClaimDoc], "_1", distinctCOUNT(Table[Invoice #])), [_1] >1)
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
66 |