Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Please see below sample data set:
Based on that data, I would like to create 3 KPI's which will be showing Month to Date view for each of the product. So for example for KPI - Product X, it should display 17, for Product Z: 9.. etc. What is more, I would like to have it responsive - when I am changing view from current month to, for example June, it should also show sum of prices per specific product (MTD view for selected month).
I am able to display sum of all prices per each product by using below expression:
Sum({<Product="X">} [Price])
but I don't know how to change it to MTD view.
I look forward to hearing from you.
Using the data below:
Data:
Load Date#([Date],'YYYY-MM') as [Date],
Product,
Price;
Load * Inline [
Date,Product,Price
2020-05,X,1
2020-05,Y,2
2020-05,Z,3
2020-06,X,4
2020-06,Y,5
2020-06,Z,6
2020-07,X,7
2020-07,Y,8
2020-07,Z,9
2020-07,X,10
];
Using this formula: =Sum({<Product={'X'},[Date]={'$(=Max(Date([Date],'YYYY-MM')))'}>}[Price])
Using the data below:
Data:
Load Date#([Date],'YYYY-MM') as [Date],
Product,
Price;
Load * Inline [
Date,Product,Price
2020-05,X,1
2020-05,Y,2
2020-05,Z,3
2020-06,X,4
2020-06,Y,5
2020-06,Z,6
2020-07,X,7
2020-07,Y,8
2020-07,Z,9
2020-07,X,10
];
Using this formula: =Sum({<Product={'X'},[Date]={'$(=Max(Date([Date],'YYYY-MM')))'}>}[Price])
Thanks a lot, it is working.