Forum Discussion
Summarize Table combined with dynamic columns
Hi,
I have a formula that looks like this and it works perfectly:
2 Replies
- amitchandak
Super User
rlebeau , You might have used a switch based on the selected param
selected = maxx(filter('Charts Parameters', 'Charts Parameters'[Axis Slicer Order]= SELECTEDVALUE('Charts Parameters'[Axis Slicer Order])),'Charts Parameters'[Axis Slicer])
Then use that in another measure, example
COGS Delta Volume =
SUMX(SUMMARIZE('Charts Parameters','Charts Parameters'[Colonnes Fields]
)
,Switch( [selected],
"Product Category", ([Quantity] - [Qty LY])*[Std Unit Cost LY],
"Product Name", ([Quantity] - [Qty])*[Std Unit Cost]
//Add other))
- rlebeauNew Member
Hi,
First thanks for taking the time to help me. But in your example (if i understand well) you hardcode the product category and product name. I don't know which column the end user is going to select, neither how many.