Forum Discussion
Like4like e calculationgroup
Buonasera community,
grazie al valido supporto di FBergamaschi per avermi aiutato a trovare la soluzione definitiva alla creazione di un filtro visivo like4like (questo è il link al post Like4Like con filtro visivo evito così dí riscrivere quanto già fatto).
Adesso però ho un problema un po' più scocciante sempre all'Interno dello stesso report dove ho creato il filtro Like4like. Ci sono un numero importante di misure calcolate che dovrebbero tener conto anche del filtro Like4Like, per esempio ho misure che utilizzo per confrontare il pari periodo anno precedente, il progressivo dall'inizio dell'anno, il margine periodo selezionato e quello relativo all'anno precedente, ecc. Ora il mio problema è molto semplice, vorrei cercare di utilizzare la tabella temporanea del filtro Like4Like che ho utilizzato per generare la Misura IncassoAC like4like per creare le altre Misure, come sopra brevemente descritto, di modo che se effettuo una modifica sulla misura principale, automaticamente questa si propagherà su tutte le altre senza che debba intervenire in ogni singola misura creata.
Mi viene in mente il CalculationGroup, come mi ha suggerito FBergamaschi, ma francamente non so se sia la strada giusta e soprattutto non saprei da dove iniziare. In buona sostanza vorrei gestire la modifica delle misure in maniera massiva, una volta creata la misura master.
Vi ringrazio anticipatamente per i vostri suggerimenti.
Ciao AntonelloLucia,
you can find my calculation group version here
https://drive.google.com/drive/folders/1BuydNLsMePMXUpwrpzlrp8tTW_kHAuPI?usp=sharing
Please use the sheet "Prova Nuova Apertura CG" where you find the two approaches compared (on the left the approach you already know - no calc groups involved, just plain DAX on the single measures -, on the right the new approach with calc group.
You can use now any measure you want on the right (the calc group approach)
Can you confirm to me this works?
Thanks
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
3 Replies
- AnonymousNot applicable
Hi AntonelloLucia,
Thank you for reaching out to the Microsoft Fabric Forum Community.
Create a tiny disconnected "Like4Like" table (Yes/No) and use it as a slicer. then build one base measure that reads the slicer and applies the L4L rule in one place. include only stores that were open at least 12 months before the selected period starts and not closed before it ends (treat blank Closing Date as still open). If the slicer = Yes, use that filtered set. if No, use the inverse. if nothing is selected, show all. Next, reuse this single base measure for everything else wrap it with standard time functions for PY, YTD, YoY and plug it into margin or other KPIs so any future change to L4L logic is done once and flows everywhere. If you have many KPIs with the same time variations, add a Calculation Group (Current, PY, YTD, YoY) in Tabular Editor so you keep just one base measure per KPI and let the group handle the time math dynamically.
Thank you & Regards,
Prasanna Kumar
- FBergamaschiSuper User
I'll come back with a solution in the afternoon
Thanks
If this helped, please consider giving kudos and mark as a solution
me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
- FBergamaschiSuper User
Ciao AntonelloLucia,
you can find my calculation group version here
https://drive.google.com/drive/folders/1BuydNLsMePMXUpwrpzlrp8tTW_kHAuPI?usp=sharing
Please use the sheet "Prova Nuova Apertura CG" where you find the two approaches compared (on the left the approach you already know - no calc groups involved, just plain DAX on the single measures -, on the right the new approach with calc group.
You can use now any measure you want on the right (the calc group approach)
Can you confirm to me this works?
Thanks
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI