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.
I have table like below cluculated total Business with below queary and it is giving correct output but need to caluculate total past year business with this year 2020 vs 2021, if this year business value high i need to show green up arrow in card visual and if value is less with then need to show down red arrow in Card visual. Please let me know how to implement.
Items | CreatedDate | Status | Value | |
Item1 | 20-Jan-2020 | Draft | 10000 | |
Item2 | 25-Feb-2021 | In Process | 20000 | |
Item3 | 16-Jan-2020 | Draft | 30000 | |
Item4 | 02-Mar-2021 | Inprocess | 40000 |
For card visual arrow I want to use this Queary
Solved! Go to Solution.
Hi @Anonymous ,
Here are the steps you can follow:
1. Create measure.
Flag =
var _thisyear=CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),YEAR('Table'[CreatedDate])=YEAR(TODAY())))
var _lastyear=CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),YEAR('Table'[CreatedDate])=YEAR(TODAY())-1))
return
IF(
_thisyear >_lastyear,UNICHAR ( 9650 ),UNICHAR ( 128315 ))
2. There seems to be no green arrow in unichar, so we can set it to green by clicking Format – Data label – Color.
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous ,
Here are the steps you can follow:
1. Create measure.
Flag =
var _thisyear=CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),YEAR('Table'[CreatedDate])=YEAR(TODAY())))
var _lastyear=CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),YEAR('Table'[CreatedDate])=YEAR(TODAY())-1))
return
IF(
_thisyear >_lastyear,UNICHAR ( 9650 ),UNICHAR ( 128315 ))
2. There seems to be no green arrow in unichar, so we can set it to green by clicking Format – Data label – Color.
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@Anonymous , with help from date table, you have few option for this year vs last year
YTD Sales = CALCULATE([Business],DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE([Business],DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
This year Sales = CALCULATE([Business],DATESYTD(ENDOFYEAR('Date'[Date]),"12/31"))
Last year Sales = CALCULATE([Business],DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))
Last to last YTD Sales = CALCULATE([Business],DATESYTD(dateadd('Date'[Date],-2,Year),"12/31"))
This Year = CALCULATE([Business],filter(ALL('Date'),'Date'[Year]=max('Date'[Year])))
Last Year = CALCULATE([Business],filter(ALL('Date'),'Date'[Year]=max('Date'[Year])-1))
rolling = CALCULATE([Business],filter(ALL('Date'),'Date'[Year]>=max('Date'[Year])-2 && 'Date'[Year]<=max('Date'[Year])) )
diff = [This Year]-[Last Year ]
diff % = divide([This Year]-[Last Year ],[Last Year ])
Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA
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 |
---|---|
117 | |
105 | |
69 | |
67 | |
43 |
User | Count |
---|---|
148 | |
103 | |
103 | |
88 | |
66 |