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
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
Employee
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
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.