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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
gopik8000
New Member

columns into rows with help of dax

Hi Team,

 

I have requirement like this in Table visual using like AC, Fridge, Fan, TV are calculated new measures and month 1 and month 2 and month 3 are coming new column .

TimeACFridgeFanTV
Month 1 2689
Month 25537
Month37623

 

i want result has like transpose into with help of Dax i required

TimeframeMonth 1 Month 2Month3
AC257
Fridge656
Fan832
TV973
2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi  @gopik8000 ,

Here are the steps you can follow:

1. Create calculated table.

Flag1 =
UNION(
SELECTCOLUMNS('Table', "Month", 'Table'[Time], "Timeframe", "AC", "Target", 'Table'[AC]),
SELECTCOLUMNS('Table', "Month", 'Table'[Time], "Timeframe", "Fridge", "Target", 'Table'[Fridge]),
SELECTCOLUMNS('Table', "Month", 'Table'[Time], "Timeframe", "Fan", "Target", 'Table'[Fan]),
SELECTCOLUMNS('Table', "Month", 'Table'[Time], "Timeframe", "TV", "Target", 'Table'[TV]))

vyangliumsft_0-1689574352412.png

True =
var _table1=
DISTINCT('Flag1'[Timeframe])
return
SUMMARIZE(
    _table1,[Timeframe],
    "Month 1",SUMX(FILTER(ALL('Flag1'),'Flag1'[Month]="Month 1"&&'Flag1'[Timeframe]=EARLIER('Flag1'[Timeframe])),[Target]),
    "Month 2",SUMX(FILTER(ALL('Flag1'),'Flag1'[Month]="Month 2"&&'Flag1'[Timeframe]=EARLIER('Flag1'[Timeframe])),[Target]),
    "Month 3",SUMX(FILTER(ALL('Flag1'),'Flag1'[Month]="Month 3"&&'Flag1'[Timeframe]=EARLIER('Flag1'[Timeframe])),[Target]))

2. Result:

vyangliumsft_1-1689574352414.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

Thanks alot it's working fine 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi  @gopik8000 ,

Here are the steps you can follow:

1. Create calculated table.

Flag1 =
UNION(
SELECTCOLUMNS('Table', "Month", 'Table'[Time], "Timeframe", "AC", "Target", 'Table'[AC]),
SELECTCOLUMNS('Table', "Month", 'Table'[Time], "Timeframe", "Fridge", "Target", 'Table'[Fridge]),
SELECTCOLUMNS('Table', "Month", 'Table'[Time], "Timeframe", "Fan", "Target", 'Table'[Fan]),
SELECTCOLUMNS('Table', "Month", 'Table'[Time], "Timeframe", "TV", "Target", 'Table'[TV]))

vyangliumsft_0-1689574352412.png

True =
var _table1=
DISTINCT('Flag1'[Timeframe])
return
SUMMARIZE(
    _table1,[Timeframe],
    "Month 1",SUMX(FILTER(ALL('Flag1'),'Flag1'[Month]="Month 1"&&'Flag1'[Timeframe]=EARLIER('Flag1'[Timeframe])),[Target]),
    "Month 2",SUMX(FILTER(ALL('Flag1'),'Flag1'[Month]="Month 2"&&'Flag1'[Timeframe]=EARLIER('Flag1'[Timeframe])),[Target]),
    "Month 3",SUMX(FILTER(ALL('Flag1'),'Flag1'[Month]="Month 3"&&'Flag1'[Timeframe]=EARLIER('Flag1'[Timeframe])),[Target]))

2. Result:

vyangliumsft_1-1689574352414.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

Thanks alot it's working fine 

gopik8000
New Member

Ac, Fridge , TV,Fan are Calculated measures can't use other than values field                                                              

TimeframeMonth 1 Month 2Month3
AC257
Fridge656
Fan832
TV973
some_bih
Super User
Super User

Hi @gopik8000 just replace row / columns in table / matrix view.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.