Forum Discussion
Help Needed - DAX
Hi All! I am currently encountering a problem with my dax.
Here's the code so far:
Contribution to Non-Adoption of Paperless Monthly =
VAR AllTransactions =
CALCULATE (
SUM ( 'Total Documents'[AllCount] ),
NOT ( ISBLANK ( 'Total Documents'[Customer #] ) ),
FILTER ( 'Total Documents', 'Total Documents'[Customer #] > 50000 ),
ALLEXCEPT ( 'Total Documents', 'Date Table'[Reporting MonthYear] ),
ALL ( 'Total Documents'[Paperless Segment] )
)
VAR NonAdoptedTransactions =
CALCULATE (
SUM ( 'Total Documents'[Unenrolled Document] ),
NOT ( ISBLANK ( 'Total Documents'[Customer #] ) ),
FILTER ( 'Total Documents', 'Total Documents'[Customer #] > 50000 )
)
RETURN
AllTransactions
//divide(NonAdoptedTransactions,AllTransactions)
I'm currently trying to return the 'AllTransactions' in this visual.
Ideally, I would want all rows to return 10557 in the Contribution to Non-Adoption Paperless Monthly, but currently it is returning the total amount per segment. I have tried the ALL(Total Documents [Paperless Segment] but it doesnt seem to be working right. Currently thats the only current thing I'm missing. My 'NonAdoptedTransactions' currently work fine.
Appreciate any help in this area. Thank you!
5 Replies
- lbendlinSuper User
Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 - AnonymousNot applicable
Here's a link of Sample Data.
https://docs.google.com/spreadsheets/d/1jal0MBKOjFvIl8JNynqkkAVIr1giZ7Za5Q0okQNPPfQ/edit?usp=sharingRaw Data
Expected Summarized Data
Hope this helps! Do let me know if you need additional information.
Thank you!
Regards,
- lbendlinSuper User
- AnonymousNot applicable
Hi! Thank you for the help, it works perfectly. I tried applying this to my visual, and the numbers are correct.
However, when I try to exclude/filter out Segments that return 0 for this measure, the values for the others change. I am assuming it filters out all transactions by these segments as well. Is there a way for me to still include their numbers in the computation?
Here's the visual with the 0 contribution Segments filtered out. Ideally it should be the same numbers for those above, but im able to filter out 0 contribution segments and no numbers change. Thank you!