The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I'm trying to reproduce the following excel in dax so I can reproduce blended cost in another matrix visual.
I'm using a matrix visual
% of total bikes
410/5,434 = 8 %
Blended cost
8 % * 42.34 = 3.19
I did find a dax formula but it was for count and the count of bikes is actually a sum.
Thank you in advance.
Hi @Anonymous ,
I create a table as you mentioned.
Then I create a measure and here is the DAX code.
Measure = SUM('Table'[LTL Count of Bikes])/SUM('Table'[Total Count of Bikes.1])*SUM('Table'[LTL Cost/Bike])
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello,
The dilemna is that the table I provided is a sum of a larger dataset. And the Total Count of Bikes is a sum of the three Types. The % of Total Bikes is dividing the count of one type from the overall total. (ex: 410/5434 = 8 %) and the Blended cost is multiplying the Cost/Bike from one type by the % of total bikes (ex: 42.34 * 8 % = 3.19).