Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
JasserBI
Frequent Visitor

Display several KPI's in the same row with current month & past month values with tendency in a Grid

Hello community,

 

I want to display in a Grid visual something like this:

JasserBI_0-1673255742078.png

Please note that are different measures for which I need the current month value (selected in a slicer of the dashboard) and their last month values in another column but in the same row as comparison. 

 

I know that the way to calculate the last month values can be achieved through DATEADD or PREVIOUSLASTMONTH formulas, but that is not the point. Because once I do that the measures are displayed as new rows as they are different measures from the current month measures.

 

Thank you very much in advance

 

 

 

1 ACCEPTED SOLUTION

@JasserBI , Use calculation group, that will be best. I have discussed the format in this video

Calculation Groups- Measure Slicer, Measure Header Grouping, Measure to dimension conversion. Complex Table display: https://youtu.be/qMNv67P8Go0

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@JasserBI , You can use date table and time intelligence to get this month vs last month

 

example measures 

 

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))

 

 

Then you can arrow measure(unichar)  and arrow color, You can use arrow as values and use conditional formatting field value option to color the arrow

 

/////Arrow
Arrow =
var _change =[Mtd Sales]-[Lmtd sales]
return
SWITCH (
TRUE(),
_change > 0, UNICHAR(9650),
_change = 0, UNICHAR(9654),
_change < 0, UNICHAR(9660)
)


/////Arrow Color
Arrow color =
var _change =[Mtd Sales]-[Lmtd sales]
return
SWITCH (
TRUE(),
_change > 0, "green",
_change = 0, "blue",
_change < 0, "red"
)

 

Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

 

UNICHAR - Tool for Custom Icon Formatting: https://www.youtube.com/watch?v=veCtfP8IhbI&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=50

 

https://exceleratorbi.com.au/conditional-formatting-using-icons-in-power-bi/
https://community.powerbi.com/t5/Desktop/FORMAT-icon-set-for-use-in-a-data-card/td-p/811692

https://exceleratorbi.com.au/dax-unichar-function-power-bi/

Hello @amitchandak,

 

First thank you for your reply. The time intelligence through several KPI is clear. You need more measures for creating the past month values. Ok. Once done that, the issue I am struggling with is to visualize it in the manner I have shown in the topic.

 

Same rows for the kpi's and their values from current month on one column and the last month on another column with the trend in third column.

 

Thank you very much in advance

@JasserBI , Use calculation group, that will be best. I have discussed the format in this video

Calculation Groups- Measure Slicer, Measure Header Grouping, Measure to dimension conversion. Complex Table display: https://youtu.be/qMNv67P8Go0

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.