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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Neel98
Frequent Visitor

DAX: Pivot column

Hi,
I need to create the pivoted column in Dax. Here I have attached the sample data. My dataset has a Number, date and value column. The final output will be Number and two date fields. Is this possible in DAX?

Neel98_0-1663253706157.png

 

1 ACCEPTED SOLUTION

@Neel98 

Please try

NewTable =
ADDCOLUMNS (
VALUES ( 'Table'[Number] ),
"5-Sep", CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Date] = DATE ( 2022, 9, 5 ) ),
"29-Sep", CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Date] = DATE ( 2022, 9, 29 ) )
)

View solution in original post

3 REPLIES 3
Neel98
Frequent Visitor

Thank you. I am looking for a calculated table. 

@Neel98 

Please try

NewTable =
ADDCOLUMNS (
VALUES ( 'Table'[Number] ),
"5-Sep", CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Date] = DATE ( 2022, 9, 5 ) ),
"29-Sep", CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Date] = DATE ( 2022, 9, 29 ) )
)

tamerj1
Super User
Super User

@Neel98 

A matrix visual will do or you're looking for a calculated table?

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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