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.
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?
Solved! Go to Solution.
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 ) )
)
Thank you. I am looking for a calculated table.
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 ) )
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
25 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |