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 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)
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 |
---|---|
111 | |
95 | |
77 | |
68 | |
54 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |