Forum Discussion
Calculation of difference between two rows
- 1 year ago
I think a visual calculation here would be the best approach anyway so I try to solve it immediately using the names in the visual picture you sent
Difference Visual CALC =
VAR MinYear = MINX ( ROWS, [Jahr] )VAR CurrentYear = [Jahr]
RETURNIF (
[Variante] = "Basis" && CurrentYear <> MinYear && ISATLEVEL ( [Jahr] ),[DVE]- CALCULATE ( [DVE], [Jahr] = CurrentYear -1 ),
[DVE] - CALCULATE ( [DVE], [Variante] = "Basis" )
)If you need to reuse this concept you need a regular measure, in that case refer to my previous post to provide some data
If this helped, please consider giving kudos and mark as a solution
mein replies or I'll lose your threadconsider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
Visual Calculation can work with Field Parameters but with some limitations, so it depends what you need to do. So I go back to the original reply:
Please include a small rows subset (not an image) of all the tables involved in your request, so that I can import them in Power BI and reproduce the data model (please show it). Please include also the DAX you wrote so far and the result you get. In this way we can reproduce the scenario and help you (Incude the field parameter usage you are considering: are you using a field parameters to allow users choose columns, measures, both?) Thank you
Hi. Thanks! I've inlcuded an extract from the data in my earlier response. I use field parameters to let the user select different measures.
- FBergamaschi1 year agoSuper User
I replied with the measure code but in order to do more if this is not enough I need the pbix with the field parameter at work
If this helped, please consider giving kudos and mark as a solution
me in replies or I'll lose your thread
consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI