hierachy
2 TopicsMy extract has separate created and resolved date tables in the same data source. How to compare?
Hi all, I am hoping someone can assist me with a comparison issue I'm having with data in Power BI. My extract has both 'Created Date Time' and 'Resolved Date Time' data in the same csv, and both have date tables / hierarchies. I have created measures to calculate the count of both and that works to a point. The issue I'm trying to understand is how to add month and year fields. I think I need a separate date table. I would like to achieve a result similar to the graph below from Excel. Any advice would be greatly appreciated.441Views0likes1CommentHow to calculate/sum measures in a hierachy/matrix?
Hi all, as of now I have treid many things and tried to wrap my head around this issue but could not find a way to solve it. Here's the problem: I need to calculate the value assigned to an account based on the sign of the value. In case the value is negative, the value is assigned a node and in case it is positive it is assigned to another node. The measure is working fine, but the value on higher hierachy levels is not calculated as I would expect it. In this example the value on ID = 2 is calculated correct via the sum_swing measure. But on node 110 the value should be -24 instead of -17 in column sum_swinging as ID 2 carries the value 0. This is what I would expect as a result These are the two tables representing the source data The measure is defined as follows: sum values = calculate(sum(Tabelle2[Value])) sum_swinging = VAR sum_ac = SUM(Tabelle2[Value]) VAR indicator_swing = OR(ISBLANK(SELECTEDVALUE(Tabelle1[NegIndicator])), ISBLANK(SELECTEDVALUE(Tabelle1[PosIndicator]))) VAR indicator_side = OR(AND(ISBLANK(SELECTEDVALUE(Tabelle1[NegIndicator])), [sum values] > 0), AND(ISBLANK(SELECTEDVALUE(Tabelle1[PosIndicator])), [sum values] < 0)) Return IF(indicator_swing, IF(indicator_side, sum_ac, 0), sum_ac) What I did alread: I found this blogpost (https://www.daxpatterns.com/parent-child-hierarchies/ ) but I do not think this is the right way of doing it. Also I found these two explanations but could not figure out how to do is (https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/ , https://community.powerbi.com/t5/Quick-Measures-Gallery/Matrix-Measure-Total-Triple-Threat-Rock-amp-Roll/m-p/411443#M150 ) Probably the solution is already close but I just cannot put the pieces together. Cheers F Here's the example data: Tabelle1 ID L0 L1 L2 L3 L4 NegIndicator PosIndicator 1 100 110 111 1 X X 2 100 110 112 2 X 3 100 120 3 X X 2 200 210 211 213 2 X 4 200 210 212 4 X X 5 200 220 5 X X Tabelle2 ID Value 1 50 2 46 3 11 4 43 5 77 6 26 1 -74 2 -39 3 -53 4 -14 5 -72 6 -302.4KViews0likes3Comments