March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello -
This is probably a simple fix, but I am very new to DAX and cannot figure out the issue.
I have a Measure [Transaction Submitted] that I am using in charts that divide values into Departments. [Transaction Submitted] is also represented in a card as well that needs to be responsive to Department selection in the chart, which I have accomplished with the help of the community. (Many thanks to @v-cgao-msft ) Here is that DAX:
Transaction Submitted =
CALCULATE (
SUM ( 'Transaction List'[Budget] ),
FILTER (
ALLSELECTED ( 'Transaction List' ),
OR (
'Transaction List'[State] = "Ongoing"
'Transaction List'[State] = "Complete"
)
&& ( 'Transaction List'[Spent] = 0
&& 'Transaction List'[Processing] = 0
&& 'Transaction List'[Pre-Processing] = 0 )
)
)
I am also referencing the [Transaction Submitted] above in another Measure [Aggregate Spend] that just SUM's two Measures [Transaction Submitted] and [Completed Transactions] in the charts on the page. Ex:
Aggregate Spend = 'Transaction List'[Transaction Submitted] + 'Transaction List'[Completed Transactions]
The problem is: for each Department, the value of [Aggregate Spend] above includes [Transaction Submitted]'s whole value - not JUST the value for that Department. So, if the total value of [Transaction Submitted] for all Departments is $100k, on my charts where it is divided into Departments, EACH Department shows $100k when it should show only that Departments portion of [Transaction Submitted]
I know the problem is not the OTHER measure [Completed Transactions] because when I remove [Transaction Submitted] from [Aggregate Spend], the value is properly divided by Department in the charts.
I'm thinking I'm missing something in the original DAX that would allow the total to be divided by Department in the charts, likely because my initial inquiry did not include this context.
Thank you in advance for any support!
Solved! Go to Solution.
You may want to take it easy on the filter stuff. Here is an alternative option
Transaction Submitted =
CALCULATE (
SUM ( 'Transaction List'[Budget] ),
ALLSELECTED ( 'Transaction List' ),
'Transaction List'[State] IN { "Ongoing", "Complete"},
'Transaction List'[Spent] = 0,
'Transaction List'[Processing] = 0,
'Transaction List'[Pre-Processing] = 0
)
As for your question - Please provide sanitized sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.
You may want to take it easy on the filter stuff. Here is an alternative option
Transaction Submitted =
CALCULATE (
SUM ( 'Transaction List'[Budget] ),
ALLSELECTED ( 'Transaction List' ),
'Transaction List'[State] IN { "Ongoing", "Complete"},
'Transaction List'[Spent] = 0,
'Transaction List'[Processing] = 0,
'Transaction List'[Pre-Processing] = 0
)
As for your question - Please provide sanitized sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
202 | |
137 | |
106 | |
70 | |
68 |