Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello Everyone,
Greetings,
i have created below matrix visual with with Year and month in column Region in rows
i have to add new column after each month and which give the comparision of current month values with previous month values as shown below.
Green down Arrow - Indicates Current month values is less compared to previous month
Yellow line - Indicates current month values are to previous month
Red Up Arrow - Indicates Current month values is less compared to previous month
Solved! Go to Solution.
@Anonymous
Hope you have a dates table in your model and it is connected to your fact table. I used the Power BI sample data and created the expected results. The file is attached below my signature.
You need to create a measure to evaluate the status and assign it to the CF logic.
DAX Formula to get the logic:
Growth =
VAR __SALES = [Total Sales]
VAR __PM =
CALCULATE(
[Total Sales],
DATEADD( Dates[Date] , -1 , MONTH )
)
RETURN
IF(
NOT( ISEMPTY(financials) ) && __PM <> BLANK() && HASONEVALUE(Dates[Year Month No]),
SWITCH(
TRUE(),
__SALES > __PM ,1,
__SALES = __PM, 0,
__SALES < __PM,-1
)
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Anonymous
Hope you have a dates table in your model and it is connected to your fact table. I used the Power BI sample data and created the expected results. The file is attached below my signature.
You need to create a measure to evaluate the status and assign it to the CF logic.
DAX Formula to get the logic:
Growth =
VAR __SALES = [Total Sales]
VAR __PM =
CALCULATE(
[Total Sales],
DATEADD( Dates[Date] , -1 , MONTH )
)
RETURN
IF(
NOT( ISEMPTY(financials) ) && __PM <> BLANK() && HASONEVALUE(Dates[Year Month No]),
SWITCH(
TRUE(),
__SALES > __PM ,1,
__SALES = __PM, 0,
__SALES < __PM,-1
)
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
67 | |
58 | |
50 | |
36 | |
34 |
User | Count |
---|---|
84 | |
73 | |
58 | |
45 | |
44 |