Forum Discussion
Need help with DAX Calculation for Sales Data
- Anonymous5 years ago
HI hanselnunes,
According to your sample data, It seems like some of the stores not have corresponding records.
If this is a case, you not able to mark tags to them because they not really exist in the table, and you not able to use the calculated expressions to interact with 'blank' records.
BTW, current power bi not able to create dynamic calculated column/tables based on the slicer/filter effect. You can consider using measures to check records and return results but current measures can't use as a category on visuals.
For this scenario, you can create a table with all of the flags and use it as column on your matrix. Then you can create two measure formulas to calculate CY and PY results based on matrix row and category group and use if statement with switch function of switch between different row content level.
DAX – Making the “Case” for SWITCH()
Clever Hierarchy Handling in DAX
Measure Totals, The Final Word
Regards,
Xiaoxin Sheng
Thank you for the information, will try this.
HI hanselnunes,
Did these here for your scenario? If you still confused about the coding formulas or other additional requirements, you can post here with detailed descriptions.
Regards,
Xiaoxin Sheng