Export Master Library to Excel - Label Expression Issue.
Hello,
I created an automation that exports the Master Library of any app to Excel so that I can manage it there and then import it back into the app using another automation, currently the app has about 500 master measures and they all get exported successfully except for 3 that have a special kind of label expression.
The measures in question are Units (Last Week), (2 Weeks ago), (3 Weeks ago). If a user selects Year 2025 Week 1, then the labels will be as below.
This is the label expression for the first one on the left:
Right(Only( {$<[YTD Flag]=,[MTD Flag]=,[WTD Flag]=,
[Retail Year Week] = P({1<[Retail Year Week Sort]={'$(=$(vMaxYearWeekSort) - 1)'}>} [Retail Year Week]),
[Retail Week] = P({1<[Retail Year Week Sort]={'$(=$(vMaxYearWeekSort) - 1)'}>} [Retail Week]),
[Retail Year] = P({1<[Retail Year Week Sort]={'$(=$(vMaxYearWeekSort) - 1)'}>} [Retail Year])>}[Retail Year]),2)
&'-'&
Only( {$<[YTD Flag]=,[MTD Flag]=,[WTD Flag]=,
[Retail Year Week] = P({1<[Retail Year Week Sort]={'$(=$(vMaxYearWeekSort) - 1)'}>} [Retail Year Week]),
[Retail Week] = P({1<[Retail Year Week Sort]={'$(=$(vMaxYearWeekSort) - 1)'}>} [Retail Week]),
[Retail Year] = P({1<[Retail Year Week Sort]={'$(=$(vMaxYearWeekSort) - 1)'}>} [Retail Year])>}[Retail Week])
This is working great in the app, but the problem is with the automation exporting this label expression, it completely ignores these 3 master items, but it exports the other 497 measures with no issues.
I troubleshoot it for a bit and it seems that the master item gets exported fine if I delete everything after '[WTD Flag]=' from the label and so I'm pretty sure its something there that the automation export doesn't like.
Is there some function I need to maybe wrap the 'Q Label Expression' with in this block to address this issue?