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

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.

Reply
lucky_jyoti
Regular Visitor

Display some measures as row and some as columns in Matrix or Inforiver visual.

Hi All, 

 

I am trying to have a visual created in Inforiver/Matrix format in which my measures will be displayed as row-wise, however the YTD values for these logics should be displayed as headed in the column-wise (title). Refer to the last 2 columns in the image. 

lucky_jyoti_0-1687760271152.png

Has anyone done this before for any requirement? Need quick suggestions. 

 

 

 

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

Hi @lucky_jyoti ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1687917437577.png

Please try:

First create a new table like this:

(Create a table that has the visual column names you need and their dates)

 

Table 2 = 
var _a = SELECTCOLUMNS('Table',"YeraMonth",'Table'[YearMonth],"Date",'Table'[Date],"Sort",[Sort])
var _b = ADDCOLUMNS(FILTER(CROSSJOIN({"2022YTD","2023YTD"},SELECTCOLUMNS('Table',"Date",'Table'[Date])),YEAR([Date])=VALUE(LEFT([Value],4))),"Sort",SWITCH([Value],"2022YTD",MAX('Table'[Sort])+1,"2023YTD",MAX('Table'[Sort])+2))
return UNION(_a,_b)

 

Manage relationship:

vjianbolimsft_4-1687919055469.png

Sort by column:

vjianbolimsft_5-1687919116248.png

Then replace the visual's original Columns field 'Table'[YearMonth" with 'Table2'[YearMonth":

vjianbolimsft_3-1687918862935.png

Final output:

vjianbolimsft_6-1687919145105.png

Best Regards,

Jianbo Li

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

1 REPLY 1
v-jianboli-msft
Community Support
Community Support

Hi @lucky_jyoti ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1687917437577.png

Please try:

First create a new table like this:

(Create a table that has the visual column names you need and their dates)

 

Table 2 = 
var _a = SELECTCOLUMNS('Table',"YeraMonth",'Table'[YearMonth],"Date",'Table'[Date],"Sort",[Sort])
var _b = ADDCOLUMNS(FILTER(CROSSJOIN({"2022YTD","2023YTD"},SELECTCOLUMNS('Table',"Date",'Table'[Date])),YEAR([Date])=VALUE(LEFT([Value],4))),"Sort",SWITCH([Value],"2022YTD",MAX('Table'[Sort])+1,"2023YTD",MAX('Table'[Sort])+2))
return UNION(_a,_b)

 

Manage relationship:

vjianbolimsft_4-1687919055469.png

Sort by column:

vjianbolimsft_5-1687919116248.png

Then replace the visual's original Columns field 'Table'[YearMonth" with 'Table2'[YearMonth":

vjianbolimsft_3-1687918862935.png

Final output:

vjianbolimsft_6-1687919145105.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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