The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi!
I am looking to display sales IF $ was spent on demos or samples.
I've created a measure for both - 'demos' and 'samples' to be calculated and filtered based on GL acct.
Although the calcuation does not work below - this is along the lines of what I am looking to create:
CALCULATE([Total Sales]), FILTER([demos] <> 0 || [samples] <> 0 )
Any help would be greatly appreciated!
Thank you!
Christina
Solved! Go to Solution.
@Anonymous Assuming that sales is something like SUM('Table'[Sales]) try:
Measure =
SUMX(FILTER('Table', [demos] <> 0 || [samples] <> 0 ), SUM('Table'[Sales]) )
@Anonymous Assuming that sales is something like SUM('Table'[Sales]) try:
Measure =
SUMX(FILTER('Table', [demos] <> 0 || [samples] <> 0 ), SUM('Table'[Sales]) )
Thank you, @Greg_Deckler !!
It worked using your example:
Sales = SUMX(FILTER(_Measures,[Demos] <> 0 || [Samples] <> 0 ), [Total Sales])
There are some customers that still show up as a zero under samples - do you know the easiest way to filter these out?
My DAX expression is:
Samples = CALCULATE([Total GL], 'GLEntry'[GL Account No] = "xxxxxx" )
Thanks again,
Christina
@Anonymous Just use the Filters pane and filter out where Sample = 0
User | Count |
---|---|
14 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
28 | |
19 | |
14 | |
8 | |
5 |