Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I want a dax expression like:
sum(amount) where
month = current month of current year
Flag =a or b
Please guide me to do this in DAX expression.
Narender
Solved! Go to Solution.
Hello,
Your information is a little rare but sounds like something like this:
CurrentAmount=
VAR ActualMonth=MONTH(TODAY())
VAR ActualYear=YEAR(TODAY())
RETURN
CALCULATE(SUM([Amount],
FILTER(Table,
MONTH([Date])=AcutalMonth&&
YEAR([Date])=ActualYEAR&&
OR([Flag]="a",[Flag]="b")
)
)
Hello,
Your information is a little rare but sounds like something like this:
CurrentAmount=
VAR ActualMonth=MONTH(TODAY())
VAR ActualYear=YEAR(TODAY())
RETURN
CALCULATE(SUM([Amount],
FILTER(Table,
MONTH([Date])=AcutalMonth&&
YEAR([Date])=ActualYEAR&&
OR([Flag]="a",[Flag]="b")
)
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |