Forum Discussion
Dynamic sumx () specific vales from a table
- 4 years ago
For my particular circumstance, I decided to add an extra column to the query by adding a line of multiple CASE WHEN functions to the sql query.
Thanks,
That section has already been covered.
CALCULATE(sumx('table','table'[RONACALLS]),fltr_Qtr,fltr_Weekday_flag,fltr_subregion_shift, FILTER(VALUES('table'),'table'[SubRegion] = "NA"))
perezco If that's already covered, then what is your question exactly?
The excel table with the conditions, if you can make that more tabular database friendly. For example a column with all the values in your IN {{value1, value2}} conditions, each value needs to be its own cell in the same column. Then you can use DAX VALUES() function and the IN operator in DAX to create those conditions and make them dynamic by getting your raw data condition table set up properly.
- perezco4 years agoAdvocate III
The idea does not appear to be a bad one.
I can do it in the backstage using sql or in the power query editor.
The disadvantage is that this report will require human intervention every time the quarter changes...because the fltr_Qtr for either of the two possibilities will be manual.- AllisonKennedy4 years agoCommunity Champion
perezco Could you add a column for 'Quarter' that filters which conditions should be used each quarter?
- perezco4 years agoAdvocate III
Your intervention has made it much easier for me to see things in a more straightforward manner.😁
yes. I have the 'Quarter' column part of this fact table. 👍