Forum Discussion
LOD to DAX conversion
5 Replies
- amitchandak
Super User
Anonymous , try a measure like
calculate(Average(Table[Vol]), filter(Table, Table[Year] = selectedvalue(Year[Year]), allexcept(Table,Table[Part ID], [Part Number], [Country])))
Allexcept with fact table and dimension
LOD- FIXED (Level of Details): https://youtu.be/hU-cVOwDCvY
- AnonymousNot applicable
Hi Amit, thanks for your reply,
I tried your calculation and many other ways, but the values are not matching.
var yrs= SELECTEDVALUE(CC[param_year]) returnvar yr = CONVERT(yrs,INTEGER) returnsumx( CC,CALCULATE(AVERAGEx(cc,CC[vol]),CONVERT(cc[param_year], INTEGER)= (yr-1),ALLEXCEPT(cc,CC[parts_id],CC[country],CC[part_number])))- Icey
Community Support
Hi Anonymous ,
Try this:
Measure = VAR yr = SELECTEDVALUE ( CC[Param_year] ) RETURN SUMX ( SUMMARIZE ( CC, CC[parts id], CC[part number], cc[country], "volpyref", CALCULATE ( AVERAGE ( CC[vol] ), FILTER ( ALL ( CC ), CC[param_year] = yr - 1 ) ) ), [volpyref] )If this doesn't work, share some sample data for test.
Reference: How to Get Your Question Answered Quickly - Microsoft Power BI Community
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Hi Icey,
Apologies for the late reply as i was busy with some other stuffs.
Coming to your provided solution . Atleast this time I am not getting blank, however the value isn't matching to Tableau version.
I will try to provide you sample data after sometime if its possible.
Thanks