Forum Discussion
Rolling 12 months Calculation with Ifs condition
Hello, I have a visual where I would like to display only data for the last 12 complete months with Some condition. but i have two separate data file, FY2324 & FY2425, Here some customer done business in different months So i need to display Customer wise Achvement For example
i Need result like
Can Someone help
- Anonymous2 years ago
Hi Anonymous ,
Thanks @amitchandak for the quick reply. Allow me to offer some other insights:
First, replace the null values in columns [FY2324.Achv] and [FY2425.Achv] with 0.
Then you can create a custom column.
if [FY2425.Achv]>100000 then "GREEN+" else if [FY2425.Achv]>=170 or [FY2324.Achv]>=170 then "GREEN" else if [FY2425.Achv]<=49999 or [FY2324.Achv]<=49999 then "AMBER" else if [FY2425.Achv]<=0 or [FY2324.Achv]<=0 then "RED" else nullIf the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- amitchandak
Super User
Anonymous , You can append these files in Power Query and then use one filter to get that
Or create a common date table, Join both tables. filter data for 12 months and use that . You can sum up measure from both table and have filter for 12 month
If you that to based on date selection
Append Tables (Power Query)
https://www.youtube.com/watch?v=KyXIDInZMxk&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=15- AnonymousNot applicable
Hi Amit
help me measure how i use filter measure only 12 month data its shoud calcalute only 12 month peried not overall, This Function i am using in Transform New column, SO its taking complate data
=IFS(OR(FY2425>=100000),"GREEN+",OR(FY2425>=50000,FY2324>=50000),"GREEN",OR(FY2425<=49999,FY2324<=49999),"AMBER",OR(FY2425<=0,FY2324<=0),"RED")
- AnonymousNot applicable
Thank you for input Amit,
Actally i have merged both table but i have to check last 12 month what i have Achved So nexti need use =IFS(OR(FY2425>=100000),"GREEN+",OR(FY2425>=50000,FY2324>=50000),"GREEN",OR(FY2425<=49999,FY2324<=49999),"AMBER",OR(FY2425<=0,FY2324<=0),"RED") then result should be below image
- AnonymousNot applicable
Hi Anonymous ,
Thanks @amitchandak for the quick reply. Allow me to offer some other insights:
First, replace the null values in columns [FY2324.Achv] and [FY2425.Achv] with 0.
Then you can create a custom column.
if [FY2425.Achv]>100000 then "GREEN+" else if [FY2425.Achv]>=170 or [FY2324.Achv]>=170 then "GREEN" else if [FY2425.Achv]<=49999 or [FY2324.Achv]<=49999 then "AMBER" else if [FY2425.Achv]<=0 or [FY2324.Achv]<=0 then "RED" else nullIf the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.