Forum Discussion
Dynamic Reference Line on line chart
- 4 years ago
Hi ajazz ,
Sorry for the late reply.
Create 2 measures as below:
Average = AVERAGEX ( FILTER ( ALLSELECTED ( MedicinPriserUnpivot ), 'MedicinPriserUnpivot'[Varenummer] = MAX ( MedicinPriserUnpivot[Varenummer] ) && 'MedicinPriserUnpivot'[Dato] = MAX ( 'MedicinPriserUnpivot'[Dato] ) ), 'MedicinPriserUnpivot'[Pris] )Measure2 = VAR _tab = CALCULATETABLE ( VALUES ( 'Vareoversigt'[Varenummer] ), FILTER ( ALL ( Vareoversigt ), 'Vareoversigt'[Substitutionsgruppe] IN FILTERS ( Vareoversigt[Substitutionsgruppe] ) ) ) RETURN CALCULATE ( MINX ( ALLSELECTED ( MedicinPriserUnpivot ), [Average] ), FILTER ( ALLSELECTED ( 'MedicinPriserUnpivot' ), 'MedicinPriserUnpivot'[Dato] = MAX ( 'MedicinPriserUnpivot'[Dato] ) && 'MedicinPriserUnpivot'[Varenummer] IN _tab ) ) + 50And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my reply as a solution!
Hi ajazz ,
Change "ALL" to "ALLSELECTED " should work,check below:
Measure = CALCULATE(MIN('Table'[Price]),FILTER(ALLSELECTED('Table'),'Table'[Date]=MAX('Table'[Date])))+50
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
Hi v-kelly-msft,
I appreciate you efforts a lot!
We are getting very close, but it seems like its not calculating correct?
Thanks again!
- v-kelly-msft4 years agoCommunity Support
Hi ajazz ,
Sorry for the late reply.
Create 2 measures as below:
Average = AVERAGEX ( FILTER ( ALLSELECTED ( MedicinPriserUnpivot ), 'MedicinPriserUnpivot'[Varenummer] = MAX ( MedicinPriserUnpivot[Varenummer] ) && 'MedicinPriserUnpivot'[Dato] = MAX ( 'MedicinPriserUnpivot'[Dato] ) ), 'MedicinPriserUnpivot'[Pris] )Measure2 = VAR _tab = CALCULATETABLE ( VALUES ( 'Vareoversigt'[Varenummer] ), FILTER ( ALL ( Vareoversigt ), 'Vareoversigt'[Substitutionsgruppe] IN FILTERS ( Vareoversigt[Substitutionsgruppe] ) ) ) RETURN CALCULATE ( MINX ( ALLSELECTED ( MedicinPriserUnpivot ), [Average] ), FILTER ( ALLSELECTED ( 'MedicinPriserUnpivot' ), 'MedicinPriserUnpivot'[Dato] = MAX ( 'MedicinPriserUnpivot'[Dato] ) && 'MedicinPriserUnpivot'[Varenummer] IN _tab ) ) + 50And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my reply as a solution!
- v-kelly-msft5 years agoCommunity Support
Hi ajazz ,
I cant reproduce your senario,would you pls share your .pbix file for test?
Remember to remove the confidential information.
Best Regards,
KellyDid I answer your question? Mark my reply as a solution!
- ajazz5 years agoFrequent Visitor
Hi v-kelly-msft
I have attached a link to the pbix here with the used datasets.
https://we.tl/t-SuEKSu1Y25
I would recommend you to slice with value 58 in 'Substitutionsgruppe'Huge thanks!!
- ajazz4 years agoFrequent Visitor
Awesome v-kelly-msft
You helped me a bunch! Thanks a lot! - v-kelly-msft4 years agoCommunity Support
Hi ajazz ,
Glad to help!🙂
Best Regards,
KellyDid I answer your question? Mark my reply as a solution!