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 everyone,
This is my table:
I would like to have only sum of amount depending on (Type could be actual, budget, forectast,..), on GL account (which is not visible in my screen shot) for the last actual date.
I try this:
LastPerAAMM:=CONCATENATE(YEAR([LastPeriod]);CONCATENATE("-";FORMAT(Month([LastPeriod]);"00")))
to find last month info (formated AAAA-MM)
and sum like that:
LastPeriod$:=CALCULATE(sum(Data[Montant]);filter(Data;Data[AAA-MM]=[LastPerAAMM]))
Result is that LastPeriod$ is empty.
I tried this:
LastPeriod:=CALCULATE(Max(Data[Date]);Data[Type]="actual")
with this:
LastPeriod$:=CALCULATE(sum([Montant]);filter(Data;Data[Date]=[LastPeriod]))
LastPeriod$ equal sum of all months like it does not take into account filter...
thanks for helping 🙂
Solved! Go to Solution.
Hi @phaum1967 ,
By my test, the following is my sample you can have a try. And the data is not exactly the same as yours. I add the column of GL and the type of budget.
I create a calculated column of LastPerAAMM.
LastPerAAMM = CONCATENATE(YEAR([LastPeriod]),CONCATENATE("-",FORMAT(Month([LastPeriod]),"00")))
Measure = CALCULATE(SUM(Table1[Amount]),ALLEXCEPT(Table1,Table1[GL],Table1[Type],Table1[LastPerAAMM]))
If the result is not what you want, please post the expected output.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @phaum1967 ,
By my test, the following is my sample you can have a try. And the data is not exactly the same as yours. I add the column of GL and the type of budget.
I create a calculated column of LastPerAAMM.
LastPerAAMM = CONCATENATE(YEAR([LastPeriod]),CONCATENATE("-",FORMAT(Month([LastPeriod]),"00")))
Measure = CALCULATE(SUM(Table1[Amount]),ALLEXCEPT(Table1,Table1[GL],Table1[Type],Table1[LastPerAAMM]))
If the result is not what you want, please post the expected output.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |