The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Solved! Go to Solution.
Hi
I was able to create such a chart:
Using this as measure:
single adjusted value =
var vminDate = CALCULATE (
MIN (CPI[Date] ),
ALLSELECTED ( CPI[Date] )
)
var vbase = CALCULATE(
sum(CPI[Sales]),
FILTER(ALLSELECTED(CPI[Date]),
CPI[Date]=vminDate))
return (sum(CPI[Sales])/vbase)*100
Try the above, or if you want to edit your code directly, replace the removefilters in the base value with a filter for all selected.
one more thing to try:
I noticed that if I have the date as a hierarchy in the chart, it has trouble calculating the min of the date, and returns flat lines
Chart with date as hierarchy:
However, when I change to the date as a value on it's own ,the problem is solved:
Chart with date as single value:
HTH,
Pi
Hi
I was able to create such a chart:
Using this as measure:
single adjusted value =
var vminDate = CALCULATE (
MIN (CPI[Date] ),
ALLSELECTED ( CPI[Date] )
)
var vbase = CALCULATE(
sum(CPI[Sales]),
FILTER(ALLSELECTED(CPI[Date]),
CPI[Date]=vminDate))
return (sum(CPI[Sales])/vbase)*100
Try the above, or if you want to edit your code directly, replace the removefilters in the base value with a filter for all selected.
one more thing to try:
I noticed that if I have the date as a hierarchy in the chart, it has trouble calculating the min of the date, and returns flat lines
Chart with date as hierarchy:
However, when I change to the date as a value on it's own ,the problem is solved:
Chart with date as single value:
HTH,
Pi
Thank you! I have tried all solutions (exhausting them all) and the real issue was the date as a value instead of as a hierarchy,
Thanks again!
It's often something that simple!
Glad it helped!
User | Count |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
7 | |
6 |