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
Hi,
I using below DAX:
Thanks,
Sandip
Solved! Go to Solution.
@dsandip OK, it's incorrect but what is your definition of correct? Maybe this?
Current Quarter Sales =
VAR __Current = MAX( 'Calendar'[Current QTD] )
VAR __Result = IF( __Current = 1, CALCULATE([Sales Amount], FILTER(ALL('Calendar'), 'Calendar'[Current QTD] = 1)), 0 )
RETURN
__Result
@dsandip You should be able to do this:
Cureent Quarter Sales = CALCULATE([Sales Amount], 'Calendar'[Current QTD] = 1)
or:
Current Quarter Sales =
VAR __Current = MAX( 'Calendar'[Current QTD] )
VAR __Result = IF( __Current = 1, [Sales Amount], 0 )
RETURN
__Result
Hi,
Your first and 2nd Measure DAX is showing below result which is incorrect:
@dsandip OK, it's incorrect but what is your definition of correct? Maybe this?
Current Quarter Sales =
VAR __Current = MAX( 'Calendar'[Current QTD] )
VAR __Result = IF( __Current = 1, CALCULATE([Sales Amount], FILTER(ALL('Calendar'), 'Calendar'[Current QTD] = 1)), 0 )
RETURN
__Result
Yes, it is working now. But I wonder that why it is not working for below DAX:
So, we need to use a if() with condition to show values for current quarter only and others to show 0. right?
Please try adding KEEPFILTERS to your measure.
Current Quarter Sales =
CALCULATE (
[Sales Amount],
KEEPFILTERS ( 'Calendar'[Current QTD] = 1 )
)
Pat
hi,
I think KEEPFILTERS() function only show related result, leaving every row value blank as expected, but I want the summation of JAN, Feb, March 2023 in one row, so it show like below:
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 |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |