Forum Discussion
Divide row by row
Hi, MarianaBotelho !
I believe that you'll need to transform your data table from this
into this:
Then, you'll have to create a measure:
Ratio = SUM( Table[Quantity] )
After this, you'll add a 'Stacked Column Chart' with the following data fields setup:
Axis X: Table[Date] (field)
Axis Y: [Ratio] (measure)
Legend: Table[Produtc] (field)
Doing so, you'll have something like this:
One way to solve the issue related to presenting dates without products is to change the data structure of the Table[Date] field. For this, do the following:
1. Click on the field 'Date',
2. Then, change the data structure format from 'Date' to 'Text'
Please mark it as a solution or give a kudo if it works for you, otherwise let me know if you run into an issue and I'll do my best to assist.
Regards,
Hi flath I am still new to the Power BI. Could you please share workflow how to transform the columns as above? I have just working hours of the sensor and whole time when it could work. Lets say my sensor work for 10 hours from day and I need to make a percentage calculation for a day or week( I will try to make this by date range)