cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors