Forum Discussion
Challenging with the DAX calculation
Hi Team,
I have a scenario like below to calculate that to through DAX, please help me on this.
I have a table in that we have the Co2 factor information and I have the fuel information of each type of the fuel. each fuel type vehicles having start date and end dates respectively, based on the end dates we need calculate the number of vehicles present in the current and next upcomming years based on that we need to calculate the active vehicle count and expiry vehicles count too below is the example
Once we are fine with the active and expired count of vehicle present in that particular year, then we need to substract the expired vehicle counts from the number of veicles count later we need to multiplty the average of co2 value by country and average of fuel consumed in that partcular year with repective to the vehicle type and final active vehicle count in that particular year(aftre substracting the value ). finally we are good with one number with repspective to the fuel type then we need to summing up the value and showed that value into line graph as a C02 Emission(that yellow highlighted one in the above screenshot). Later we need sum up the active electric vehicle count in that particular year and expired vehicles count both diesel and petrol the total number(the yellow highlighted number 22) we need to show in the line chart as a Count of EV's,
Note: The main aim of this calculation is expired vehicles of both diesel and petrol vehicles turned into EV's (electric Vehicles ) for that pupose we need this calaculation we are faced a challenging in this dax please help me to solve this. I have attached the mock up report as well for reference.
Thank you so much in advance to solve this....
1 Reply
- lbendlin
Super User
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523