Forum Discussion
Need a DAX measure to replace an Excel function.
- 7 years ago
Hi there,
I wish everyone was as clear in describing their needs! :)I think the below will help you.
I simply created the running total for both columns, devided it and *1000.Calc = DIVIDE( CALCULATE( SUM('Table'[Number of Complaints]); FILTER( ALLSELECTED('Table'[Month]); ISONORAFTER('Table'[Month]; MAX('Table'[Month]); DESC) ) ); CALCULATE( SUM('Table'[Number of Key Transactions]); FILTER( ALLSELECTED('Table'[Month]); ISONORAFTER('Table'[Month]; MAX('Table'[Month]); DESC) ) ) )*1000Hope this helps.
This cannot be a text value.
It needs to be a numeric or date value
RobbeVL wrote:This cannot be a text value.
It needs to be a numeric or date value
It is a numerical value RobbeVL
- PaulMac7 years agoHelper IV
OK I have done something very wrong here. Why is is this so difficult!!
My Measure:
Calc2 = DIVIDE( CALCULATE (SUM('Monthly Complaints Received'[MonthVolume]), FILTER( ALLSELECTED('Date_Table'[Month]), ISONORAFTER(Date_Table[Month],MAX(Date_Table[Month]), DESC) ) ), CALCULATE( SUM('Total_key_Transactions'[Total Key Transactions]), FILTER( ALLSELECTED(Date_Table[Month]), ISONORAFTER(Date_Table[Month],MAX(Date_Table[Month]),DESC) ) ) )*1000Your measure:
Calc = DIVIDE( CALCULATE( SUM('Table'[Number of Complaints]); FILTER( ALLSELECTED('Table'[Month]); ISONORAFTER('Table'[Month]; MAX('Table'[Month]); DESC) ) ); CALCULATE( SUM('Table'[Number of Key Transactions]); FILTER( ALLSELECTED('Table'[Month]); ISONORAFTER('Table'[Month]; MAX('Table'[Month]); DESC) ) ) )*1000Our measures are basically a mirror of each other. So why am I getting a different outcome to you?
Are you able to share your sample file so I may see how you acheived this in mintues what is currently taking me hours.
:smileysad:
- RobbeVL7 years agoImpactful Individual
try this:
(relace month by your date value in that table)
Calc2 = DIVIDE( CALCULATE (SUM('Monthly Complaints Received'[MonthVolume]), FILTER( ALLSELECTED('Monthly Complaints Received'[Month]), ISONORAFTER('Monthly Complaints Received'[Month],MAX('Monthly Complaints Received'[Month]), DESC) ) ), CALCULATE( SUM('Total_key_Transactions'[Total Key Transactions]), FILTER( ALLSELECTED('Monthly Complaints Received'[Month]), ISONORAFTER('Monthly Complaints Received'[Month],MAX('Monthly Complaints Received'[Month]),DESC) ) ) )*1000Looks like I already deleted the sample file.
If its doesnt work now, I'll remake it :)