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.
Hello all,
I created a graph which shows the ROAS for this week and the previous week (x Axis = Day of week and y Axis= ROAS):
The measure for the ROAS of the previous week is calculated as follows :
Solved! Go to Solution.
Hi @KiravonEhren,Please try to update the formula of measure [ROAS per Day previous Month] as below and check if can return the correct result...
PS: The part with red font is update ones....
ROAS per Day previous Month = DIVIDE ( CALCULATE ( SUM ( 'All data'[NetRevenue (Attributed, ToCnv)] ), PREVIOUSMONTH ( 'All data'[Date] ), 'All data'[Costs (Total, Commission, ToCnv)] <> 0, ALL ( 'All data' ) ), CALCULATE ( SUM ( 'All data'[Costs (Total, Commission, ToCnv)] ), PREVIOUSMONTH ( 'All data'[Date] ), 'All data'[Costs (Total, Commission, ToCnv)] <> 0, ALL ( 'All data' ) ) ) |
How to create Dax logic for this Month and Previous Month
= CALCULATE(SUM(Table[Auftragsbestand]); VALUES(Table[PG]);DATEADD(Table[Datum];-1;MONTH))
If the above one can't help you get the desired result, please provide some sample data in your tables'All data' and'Date'(exclude sensitive data) with Text format and yourexpected result with backend logic, screenshot of your visuals and special examples. By the way, is there any relationship created between the table 'All data' and 'Date'? It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi @KiravonEhren,Please try to update the formula of measure [ROAS per Day previous Month] as below and check if can return the correct result...
PS: The part with red font is update ones....
ROAS per Day previous Month = DIVIDE ( CALCULATE ( SUM ( 'All data'[NetRevenue (Attributed, ToCnv)] ), PREVIOUSMONTH ( 'All data'[Date] ), 'All data'[Costs (Total, Commission, ToCnv)] <> 0, ALL ( 'All data' ) ), CALCULATE ( SUM ( 'All data'[Costs (Total, Commission, ToCnv)] ), PREVIOUSMONTH ( 'All data'[Date] ), 'All data'[Costs (Total, Commission, ToCnv)] <> 0, ALL ( 'All data' ) ) ) |
How to create Dax logic for this Month and Previous Month
= CALCULATE(SUM(Table[Auftragsbestand]); VALUES(Table[PG]);DATEADD(Table[Datum];-1;MONTH))
If the above one can't help you get the desired result, please provide some sample data in your tables'All data' and'Date'(exclude sensitive data) with Text format and yourexpected result with backend logic, screenshot of your visuals and special examples. By the way, is there any relationship created between the table 'All data' and 'Date'? It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hello Ying,
Thank you for your reply. This solution worked! 🙂
Could you explain to me where my thinking was wrong and why my formula did not work?
Thank you so much, your help is highly appreciated!
Kira
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 |
---|---|
105 | |
96 | |
79 | |
67 | |
62 |
User | Count |
---|---|
137 | |
106 | |
104 | |
81 | |
63 |