Forum Discussion
PavB
2 years agoFrequent Visitor
DAX Question - Interesting
Hello All, I have an Interesting question – In my data, I have fuel producer, fuel purchaser, contract start date, contract duration, and total volume for the contract duration. How do I show a b...
- 2 years ago
PavBidani solution attached, tweak it as you see fit.
- 2 years ago
Hi,
Please find attached the PBI file.
Hope this helps.
PavBidani
2 years agoHelper II
Hi Parry2k,
The bar chart you are showing in the Fuel.pbix is correct.
And yes, the total fuel volume is divided equally for all years in the duration of the contract.
My question is, given the input data below, 2 recrods, how do we create 4 records (which is the right thing to do) to create the bar chart.
Since real data will have many rows, need to do it automatically (dax or power query), not manually.
Thanks again!
Pav
| YEAR | FUEL PRODUCER | FUEL PURCHASER | TOTAL VOLUME ( MILLIONS OF LITERS) | DURATION OF AGREEMENT (YEARS) |
| 2014 | ABC | United Airlines | 10 | 1 |
| 2015 | PQR | Delta | 36 | 3 |
- parry2k2 years agoSuper User
If you pay attention to the table which produced the bar chart, it is already producing the rows in the PQ. You need to out some efforts to look and explore the file before asking these questions. Thanks!