The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I fixed it in one of the reference measures. Never did figure out how to select a variable to use in a expression like divide.
I am trying to create a measure where the denominator changes based on the shared axis value.
I need to change the Denominator depending on what is being Calculated.
I have tried IF statements, but will not allow me to use the Table column or measures that show the value to be used as the Logic test.
I know the below code is not all correct, but it should get the question across.
i.e.
TotalSalesRatio =
Var Totalsalespeople = [AllSalesPeople]
Var TotalsalesoneSalesperson = [SalesPerson]
Var DesiredReportSales = ""
If([DesiredReport]="all",
AllSalesPeople,
TotalsalesoneSalespPerson)
Divide([TotalSales],DesiredReportSales,0)
Solved! Go to Solution.
I fixed it in one of the reference measures. Never did figure out how to select a variable to use in a expression like divide.
I added a filter in one of the reference measures so that the data sent to the divide calculation had the required information.
I fixed it in one of the reference measures. Never did figure out how to select a variable to use in a expression like divide.
I added a filter in one of the reference measures so that the data sent to the divide calculation had the required information.
What I need to be returned by the measure. I have highlighted the number that I need to be able to select via an if statement or someother command.
Total Power(input) | Peak Power(Input) | Ratio (output) | |
Area1 | 5531.68 | 9812.91 | 56.37% |
Area2 | 819.26 | 1211.00 | 68% |
What I am getting returned by the measure
Total Power(input) | Peak Power(input) | Ratio(output) | |
Area1 | 5531.68 | 9812.91 | 56.37% |
Area2 | 819.26 | 3459.02 | 23.68% |
I have a Visual that needs to be different during the week than it is on weekends. During the week, the measure is based on a weekly peak of a subset of equipment. On the weekends it is the Peak of all the equipment.
I need to figure out how to calculate the Ratio for the total power used divided by both the "Weekly Peak of subset of equipment" and "Peak of all the equipment", one at a time.
This visual needs to have the ratio for total Power used divided by both the Subset and all calculated values.
Hi @moltra ,
Your query is not making any sense. The only thing I understand here is you want to use DIVIDE function in DAX but you are not able to use it.
Add some sample data and expected output to show what your actual requirement is.
Thanks,
Pragati
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
18 | |
18 | |
17 | |
15 | |
11 |
User | Count |
---|---|
35 | |
35 | |
19 | |
18 | |
14 |