Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
I am trying to create a visual which shows actual cost per sale by brand against target, filterable by month and by brand.
I am struggling with the DAX for the measure for the true cost per sale over a filtered period of time - ie it is the sum of the spend for those months divided by the sum of the sales for those months. I thought it would be straight forward but nothing I've tried works.
Here's the sample data. I'd really appreciate any help as I have a total mind block with this now.
| Brand | Month | Spend | Sales | CPS | Target |
| Brand1 | Jan-22 | £16,505.46 | 985 | £16.76 | £21.00 |
| Brand1 | Feb-22 | £7,558.00 | 845 | £8.94 | £21.00 |
| Brand2 | Jan-22 | £5,632.64 | 183 | £30.78 | £67.00 |
| Brand2 | Feb-22 | £1,972.25 | 110 | £17.93 | £67.00 |
| Brand3 | Jan-22 | £16,413.63 | 614 | £26.73 | £52.00 |
| Brand3 | Feb-22 | £8,211.31 | 427 | £19.23 | £52.00 |
Many thanks
Victoria
Hi @vicsinc ,
Does your problem been solved by @amitchandak 's solution, if yes, please consider accept it as the solutionto help the other members find it more quickly. If not, could you please show your expected result?
Best Regards,
Community Support Team _ kalyj
THank you for your help!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 55 | |
| 40 | |
| 35 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 71 | |
| 70 | |
| 38 | |
| 35 | |
| 23 |