Forum Discussion
ATMAN777
1 year agoNew Member
Using a baseline perspective
Hi PowerBI gurus, Given a dataset example below, I'd like to display total sale quantity by date in a line graph. This I can easily do. I'd like to be able to use a baseline line (the start from ...
- 1 year ago
Hi ATMAN777
Thanks for updating the post. here is the solution:
you can write a measure as follows:
sales_by_baseline =var baseline = min(DimDate[date])var fruits = summarize(filter(all(Table_sales) , Table_sales[Date] = baseline) , Table_sales[Fruit])RETURNcalculate(sum(Table_sales[Sale Quantity]) , filter (Table_sales, Table_sales[Fruit] in fruits && Table_sales[Date] >= baseline ))kepp in mind that X-axis of line chart should be selected from sales_table and the slicer should be selected from DimDate . and also there should NOT be any relation between your sales_table and dimdateIf this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.
Selva-Salimi
Solution Sage
1 year agoHi ATMAN777
Thanks for updating the post. here is the solution:
you can write a measure as follows:
sales_by_baseline =
var baseline = min(DimDate[date])
var fruits = summarize(filter(all(Table_sales) , Table_sales[Date] = baseline) , Table_sales[Fruit])
RETURN
calculate(sum(Table_sales[Sale Quantity]) , filter (Table_sales, Table_sales[Fruit] in fruits && Table_sales[Date] >= baseline ))
kepp in mind that X-axis of line chart should be selected from sales_table and the slicer should be selected from DimDate . and also there should NOT be any relation between your sales_table and dimdate
If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.
- ATMAN7771 year agoNew Member