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.
Hi Decter3343 ,
In this case will you need to have a parameter for each of the vendors so in this case the 1000?
Parameter is only for selected Vendors in slicer.
in my case, maximum number of selected vendor is Five.
therefore, only 5 parameter is required.
but in slicer, there is almost 1,000 number of vendor is listed.
below list is my work process
1. select potential vendor in the slicer (maximum 5)
2. selected vendor is listed in the table.
3. most of scores are counted automatically.
4. addtional score will be added using parameter.
- MFelix3 years ago
Super User
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.
- Decter33433 years agoFrequent Visitor
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.