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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

DAX to Pivot data

Hi,
I have 3 columns Amt, Row Date and Column date.  

 

img 1.png

 

I want to display the data as 

 

img 2.png

 

Looking for a help on DAX formula, how to do it. 

3 REPLIES 3
Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @Anonymous

 

Can you please paste your sample data so we can make a measure that works perfectly for you.

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Anonymous
Not applicable

@Phil_Seamark Attached both excel used and PBIX file. Click Here 

Anonymous
Not applicable

I got this working, but need help on fine-tuning the formula. 

Note:- I have more than 35M records in my table.

 

Def Revenue (M) =
VAR Month_Start = SELECTEDVALUE('Fact - Table'[recognition_Date])
VAR Earning = SELECTEDVALUE('Fact - Table'[earnings_Date])
VAR End_Date = CALCULATE(MAX('Fact - Table'[earnings_Date]), ALL('Fact - Table'))

RETURN

IF(Month_Start = Earning, "" ,
CALCULATE(
SUM('Fact - Table'[earnings_amount]),
'Fact - Table'[earnings_Date] > Month_Start
&& 'Fact - Table'[earnings_Date] >= Earning
&& 'Fact - Table'[earnings_Date] <= End_Date
)
)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.