cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bharathsurya
Helper I
Helper I

Please help to get required output in matrix visual

My data is as shown below

bharathsurya_0-1626952551681.png

Required output,

 

bharathsurya_1-1626952753114.png

Coulmn 0 shows total account in respective  Month-Year, Rest columns (1-5) shows only Open Acc in respective months.

Not able to get this output in power bi. 
thanks in advance.

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @bharathsurya ,

Here are the steps you can follow:

1. Create calculated column.

Month_Year = FORMAT('Table'[Date],"mmm")&"-"&RIGHT(YEAR('Table'[Date]),2)
Month_Number = MONTH('Table'[Date])

2. Create measure.

1 =
SUMX(FILTER(ALL('Table'),'Table'[Month_Year]=MAX('Table'[Month_Year])&&'Table'[Type]=1),[Open Acc])
2 =
SUMX(FILTER(ALL('Table'),'Table'[Month_Year]=MAX('Table'[Month_Year])&&'Table'[Type]=2),[Open Acc])
3 =
SUMX(FILTER(ALL('Table'),'Table'[Month_Year]=MAX('Table'[Month_Year])&&'Table'[Type]=3),[Open Acc])
4 =
SUMX(FILTER(ALL('Table'),'Table'[Month_Year]=MAX('Table'[Month_Year])&&'Table'[Type]=4),[Open Acc])
5 =
SUMX(FILTER(ALL('Table'),'Table'[Month_Year]=MAX('Table'[Month_Year])&&'Table'[Type]=5),[Open Acc])

3. Select column [Month_Year] – Column tools – Sort by column – column [Month_Number]

vyangliumsft_0-1627290483393.jpeg

4. Select Sort descending in the matrix visual object.

vyangliumsft_1-1627290483395.png

5. Result:

vyangliumsft_2-1627290483396.png

 

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

View solution in original post

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @bharathsurya ,

Here are the steps you can follow:

1. Create calculated column.

Month_Year = FORMAT('Table'[Date],"mmm")&"-"&RIGHT(YEAR('Table'[Date]),2)
Month_Number = MONTH('Table'[Date])

2. Create measure.

1 =
SUMX(FILTER(ALL('Table'),'Table'[Month_Year]=MAX('Table'[Month_Year])&&'Table'[Type]=1),[Open Acc])
2 =
SUMX(FILTER(ALL('Table'),'Table'[Month_Year]=MAX('Table'[Month_Year])&&'Table'[Type]=2),[Open Acc])
3 =
SUMX(FILTER(ALL('Table'),'Table'[Month_Year]=MAX('Table'[Month_Year])&&'Table'[Type]=3),[Open Acc])
4 =
SUMX(FILTER(ALL('Table'),'Table'[Month_Year]=MAX('Table'[Month_Year])&&'Table'[Type]=4),[Open Acc])
5 =
SUMX(FILTER(ALL('Table'),'Table'[Month_Year]=MAX('Table'[Month_Year])&&'Table'[Type]=5),[Open Acc])

3. Select column [Month_Year] – Column tools – Sort by column – column [Month_Number]

vyangliumsft_0-1627290483393.jpeg

4. Select Sort descending in the matrix visual object.

vyangliumsft_1-1627290483395.png

5. Result:

vyangliumsft_2-1627290483396.png

 

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

View solution in original post

lbendlin
Super User III
Super User III

Change your requirement. Drop the need for column 0, and enable row totals.

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.