Forum Discussion
PaulMac
7 years agoHelper IV
Need a DAX measure to replace an Excel function.
Hi The table in the attached file is a Pivot Table with the exception of the last column (YTD Complaints per 1,000 Transactions) which is a formula that I have outlined above (column G). The formul...
- 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.
RobbeVL
7 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)
)
)
)*1000 Looks like I already deleted the sample file.
If its doesnt work now, I'll remake it :)
PaulMac
7 years agoHelper IV
Nope that last recommendation made absolutely no difference.
Please could rebuild and submit a sample file so I can see where I am going wrong?
Thanks
PaulMc
- RobbeVL7 years agoImpactful Individual
Here you go
https://drive.google.com/open?id=1v9ba_6hnUGYNv8P2B61UIcGy3rDYw6_X
Also use the date in your FACT table, NOT from a dimension. That might help the problem.
- RobbeVL7 years agoImpactful Individual
Welcome!
Please mark as resolved! :)