Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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