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 August 31st. Request your voucher.
Example
Hi trying to understand why my measure is not working the way it should. I have the following measures:
1. Amount: = SUM(Data[New Funds])
2. DecisionAmt: = CALCULATE([Amount],
USERELATIONSHIP (Calendar[Date],Data[Decision Date]))
3. DecisionAmt Declined: = CALCULATE([DecisionAmt],
FILTER(
VALUES(Data[Report Type]),
Data[Report Type]="declined"
))
I have a table with Year-Month on the row with [DecisionAmt] and [DecisionAmt Declined] measures. Also, I have a slicer on Data[Report Type] column and I have sliced by "declined".
I had expected [DecisionAmt Declined] to show declined data for 2019-06 but it does not. Is this a bug or is my measure(i.e. [DecisionAmt Declined]) wrong.
Alfred
Solved! Go to Solution.
Very odd, somehow the FILTER in your measure was interacting with the context to exclude a row although I am not sure why.
This will return the correct amount for you:
DecisionAmt Declined = CALCULATE( [DecisionAmt], Data[Report Type]="declined" )
Thanks jdbuchanan
Would be interesting to know why DAX is behaving this way.
Alfred
Hi ,
Actually I don't think it's needed to add the third measure if you just wanna the [DecisionAmt] changing by slicer, every time you click the slicer, the data will be filtered by specific type.
But I believe the suggestion provided by @jdbuchanan71 does work.
Hi jdbuchanan
Can do. Any chance I can get your email contact?
Not sure how to upload file on this site.
Alfred
I would be interested in seeing your .pbix too. This is a super weird issue. I'm curious what happens if you change the third measure to this:
DecisionAmt Declined: = CALCULATE([DecisionAmt], FILTER( Data, Data[Report Type]="declined" ))
The best way to share .pbix files on this forum is to upload it to Google Drive, Dropbox, OneDrive, etc. and post the shareable link.
Very odd, somehow the FILTER in your measure was interacting with the context to exclude a row although I am not sure why.
This will return the correct amount for you:
DecisionAmt Declined = CALCULATE( [DecisionAmt], Data[Report Type]="declined" )
Thanks jdbuchanan
Would be interesting to know why DAX is behaving this way.
Alfred
Hi @atavo
Could you tell me if your problem has been solved? If it is,kindly mark the helpful answer as a solution if you feel that makes sense. Welcome to share your own solution. others will benefit from here.
User | Count |
---|---|
74 | |
70 | |
39 | |
30 | |
28 |
User | Count |
---|---|
104 | |
95 | |
51 | |
48 | |
46 |