Forum Discussion
create chart from start, end-date and total value
I replied to a similar post using Power Query. It's here:
https://community.powerbi.com/t5/Power-Query/PowerQuery-M-instead-of-DAX/m-p/1347532#M42526
To get the 'amount per Day' add a column to divide [Omsättning] by the days between start and end (Do this before expanding the column with the list of dates).
After you expand the list column, you can get the running total in Power Query or DAX
-------------------
To use DAX to create the table, you can start with:
T2 = GENERATE(Projekt, VAR _start = Projekt[Start] VAR _end = Projekt[**bleep**]
RETURN
CALENDAR(_start, _end)
)
Filter the Projekt table for 'Order' in the above syntax if required
Almost there now,
I managed to get the running total but can't divide the new table properly.
For the status "Budget" I want to show that on a line chart and for all other I want to show a stacked bar chart.
As soon as I add the last filter to my calculation it breaks.
I attached the file here:
- HotChilli5 years agoCommunity Champion
Some unusual things going on here. Quite advanced DAX combined with using the built-in date tables and an unrelated Calendar table which doesn't appear to be used and a hidden table in dataview (Result) which is being used.
Anyway, are we talking about the lower line/column chart? And it's using T2 data.
I don't really have time to look in detail at the measures but I suggest you make a copy of the measure 'Lopande summa......' and replace the last Filter clause with:
FILTER(T2, 'T2'[Status] = "Budget")Put this new measure in the Line Values. Please test.