Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I monitor the productmargin in PowerBI based on customer and product niveau.
I want to know what the marge will be when i change the price of my products.
I think i can fix this with a parameter, for example a X% price difference.
But i want to use this price changes only on the selected products or customers (slicer).
Is this possible or how can I build this in PBI.
Or maybe someone have another idea to fix this?
Example data:
Solved! Go to Solution.
Hi @Anonymous ,
You can create two tables(customer no, item no, no relationship to original tables) as source of slicers. Then write a measure to get calculate result from these slicers:
Changed = VAR _sItem = ALLSELECTED ( Item[Item_No] ) VAR _sCust = ALLSELECTED ( Customer[Cust_No] ) VAR _Price = SELECTEDVALUE ( Table[Percent] ) VAR _totalSales = MAX ( Sample[Price] ) / MAX ( Sample[Margin] ) * MAX ( Sample[Quantiy] ) RETURN IF ( MAX ( Sample[Cust_No] ) IN _sCust && MAX ( Sample[Item_No] ) IN _sItem, _totalSales * _price, _totalSales )
If above not help, please share a pbix file with sample data and expected result for further test.
Regards,
Xiaoxin Sheng
Hi @Anonymous ,
You can create two tables(customer no, item no, no relationship to original tables) as source of slicers. Then write a measure to get calculate result from these slicers:
Changed = VAR _sItem = ALLSELECTED ( Item[Item_No] ) VAR _sCust = ALLSELECTED ( Customer[Cust_No] ) VAR _Price = SELECTEDVALUE ( Table[Percent] ) VAR _totalSales = MAX ( Sample[Price] ) / MAX ( Sample[Margin] ) * MAX ( Sample[Quantiy] ) RETURN IF ( MAX ( Sample[Cust_No] ) IN _sCust && MAX ( Sample[Item_No] ) IN _sItem, _totalSales * _price, _totalSales )
If above not help, please share a pbix file with sample data and expected result for further test.
Regards,
Xiaoxin Sheng
Hi @Anonymous ,
What parameter you mean? 'Query parameter' or 'what if' parameter? If you mean 'what if' parameter, it is possible. You can write a measure to calculate current row contents with selected value.
If you mean query parameter, normally slicer/filter can't interact with query parameters. You need to turn on enable 'load option' to load it as a table, then you can use it calculate with selected records.
Regards,
Xiaoxin Sheng
What - if parameter,
But i can't fix it
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
78 | |
65 | |
53 |
User | Count |
---|---|
144 | |
103 | |
98 | |
85 | |
64 |