Forum Discussion
Calculate each values in slicer selection
- 3 years ago
So for this you want to pick up 5 vendors and apply to those the parameters correct?
I assume you have a table for vendors (dimension and another with the fact tables and a measure that you are using to be changed.
Create the following measure:
Total adjusted = VAR test = CALCULATE ( COUNTROWS ( ALLSELECTED ( 'Vendors' ) ), FILTER ( ALLSELECTED ( 'Vendors'[Vendor] ), 'Vendors'[Vendor] <= MAX ( 'Vendors'[Vendor] ) ) ) RETURN SWITCH ( test, 1, [Total Sales]+ [Vendor1 Parameter Value], 2, [Total Sales] + [Vendor 2 Parameter Value], [Total Sales] )In this case I only have two but you can have 5 or more:
Check PBIX file attach.
So for this you want to pick up 5 vendors and apply to those the parameters correct?
I assume you have a table for vendors (dimension and another with the fact tables and a measure that you are using to be changed.
Create the following measure:
Total adjusted =
VAR test =
CALCULATE (
COUNTROWS ( ALLSELECTED ( 'Vendors' ) ),
FILTER (
ALLSELECTED ( 'Vendors'[Vendor] ),
'Vendors'[Vendor] <= MAX ( 'Vendors'[Vendor] )
)
)
RETURN
SWITCH (
test,
1, [Total Sales]+ [Vendor1 Parameter Value],
2, [Total Sales] + [Vendor 2 Parameter Value],
[Total Sales]
)
In this case I only have two but you can have 5 or more:
Check PBIX file attach.
Thank you so much. it's exactly what i want.
I couldn't have dont it without your help. You are literally a super user.
Once again, thanks you very much.