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.
I'm looking for a special DAX-Code!
I want to be able to divide my net sales with changing numbers. I want to deposit the numbers in a table and decide on my own when i want to take which digit of the collumn
I do not want to write the numbers (e.g.: 1, 10, 100, ...) with which I divide but select them from a table
Please, I need help ASAP
Best regard
Tobias
Solved! Go to Solution.
Hey,
you can the number you want use for the division to a slicer.
Then create a measure like so:
SelectedNumber = SELECTEDVALUE('<tablename>'[ColumnThatContainsTheNumber] , defaultvalue)
Then just create a second measure for the division like so:
TheDivision = DIVIDE([my net sales] , [SelectedNumber])
Hopefully this will provide what you are looking for.
Regards,
Tom
Hey,
you can the number you want use for the division to a slicer.
Then create a measure like so:
SelectedNumber = SELECTEDVALUE('<tablename>'[ColumnThatContainsTheNumber] , defaultvalue)
Then just create a second measure for the division like so:
TheDivision = DIVIDE([my net sales] , [SelectedNumber])
Hopefully this will provide what you are looking for.
Regards,
Tom
1. Create a one-column table with the values you need (1,10,100...). Let's call it AuxTable[Number]
2. Place AuxTable[Number] in a slicer
3. Create this measure, which will give you the number selected in the slicer
Measure = SELECTEDVALUE(AuxTable[Number])
4. Use the measure wherever you need the selected number
Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |