I'm trying to create a dynamic dataset in Power BI. What i want to do is as far as i am aware not possible in Power BI:
I want to set a column in the query table to read in what the slicer has been selected for e.g. my formula in the query would be: 1000* slicer value. this column would then be used by subsequent columns to calculate an output.
However as said everything i know about Power BI says you cannot read dynamic data into the query.
So what i wanted to do was create a number of measures that create a new table dataset starting from that first point e.g. have a measure running from the slicer to do the initial calculation and then adding measures to that measure to complete the rest of my calculations e.g. i want to replicate the table i would have in the query but in terms of measures.
Hello @Ireland111,
1. Create a measure that captures the slicer value:
Slicer Value = SELECTEDVALUE('Table'[SlicerColumn])
2. Create measures that use the slicer value to perform calculations:
Calculation = 1000 * [Slicer Value]
3. Use the calculated measures to perform subsequent calculations:
Final Calculation = [Calculation] + 500
Keep in mind that measures are calculated at runtime based on the context of the visuals they are used in. Therefore, as you change the slicer selection, the measures will automatically recalculate and update accordingly.
Note: Alternatively, you can also use calculated columns instead of measures if you need the dynamic calculation to be part of the data model itself rather than being calculated on the fly.
Let me know if you might need further assistance.
➤ Website: https://sahirmaharaj.com
➤ Email: sahir@sahirmaharaj.com
➤ Lets connect on LinkedIn: Join my network of 10K+ professionals
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30k readers! Sharing my knowledge about data science and artificial intelligence
User | Count |
---|---|
118 | |
63 | |
61 | |
41 | |
40 |
User | Count |
---|---|
118 | |
67 | |
65 | |
64 | |
50 |