Forum Discussion

tomekm's avatar
tomekm
Helper III
3 years ago

Compute changes for the same attribute, when comparing 2 Periods selected by the user in a filter

Hello,

 

I’m trying to come up with a DAX formula or data modelling option that will compute changes for the same attribute, when comparing 2 Periods selected by the user in a filter. The same value in column A appears in each Period, but can have a different value in column B. I’m trying to identify those that aren’t the same value. Here’s my example:

AttributeSub-attributePeriod
AxJan-2023
AyJan-2023
AzJan-2023
BwJan-2023
CmJan-2023
CnJan-2023
AxFeb-2023
AyFeb-2023
AdFeb-2023
BsFeb-2023
CvFeb-2023
CnFeb-2023

 

Expected outcome would be a TRUE/FALSE column that will identify which Attributes are changing sub-attributes from period 1 to period 2. (Note that a single Attribute can have more than 1 sub-attribute in any given month; and that the formula should only consider Attributes that appear in both Periods selected for analysis, i.e. don't show as FALSE an Attribute that appeared in Period 2 but wasn't there in Period 1.. Simply ignore it). Expected outcome table:

AxTRUE
AyTRUE
AdFALSE
BsFALSE
CvFALSE
CnTRUE

 

Thanks a lot.

 

2 Replies

    • tomekm's avatar
      tomekm
      Helper III

      Thanks for the response; the formula works only partially. The problem/limitations now are that the formula is also labelling as False new entries that are present in current Period that were not existing in the previous Period. Those should be ignored, and only entries present in both Periods should be considered for analysis.

       

      Also, there’s a missing dynamic Periods filter, needed to be able to pick the starting period and ending period (for example if I want to compare Period two to Period eight.

       

      Finally, how do I only show the False rows, and not the whole table? The measure cant be added as filter.

       

      Thank you.