The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Power Bi Community,
I have a table in which there are three columns Index, Category, Value. In this table there are 8 rows and 1st row that is category 1 value should be dynamic it should change depending upon the date slicer.
I have a another table where i have created a measure. I want to create another measure and in the DAX i want to assign the measure that i have already in the table to the category 1 value as it is the requirement and for the other categories i will assign static values which does not change and I want display that measure on Column chart.
I applied this but the dynamic column is not displayed in the chart all the other static column values are displayed.
Example: category 1 is Books it value should be dynamic(integer value) when the date slicer is selected.
how to achieve this, please suggest a solution.
Thanks & Regards,
Ibrahim
@Ibrahim_shaik, Based on what I got
If you have static Values you can use measure like
Category Value =
SWITCH(
SELECTEDVALUE('Categories'[Category]),
"Books", [Dynamic Book Sales], // Dynamic value
"Category2", 300, //static value
"Category3", 150,
0
)
or you can try all or allselected
Category Value =
SWITCH(
SELECTEDVALUE('Categories'[Category]),
"Books", [Dynamic Book Sales], // Dynamic value
"Category2", calculate([Dynamic Book Sales],all()) , //static value
"Category3", , calculate([Dynamic Book Sales],all()) ,
0
)
or
Category Value =
SWITCH(
SELECTEDVALUE('Categories'[Category]),
"Books", [Dynamic Book Sales], // Dynamic value
"Category2", calculate([Dynamic Book Sales],allselected()) , //static value
"Category3", , calculate([Dynamic Book Sales],allselected()) ,
0
)
Hi @amitchandak ,
Thank you for the response.
I have already tried this measure but it does not work.
I have added category and date in the X axis and measure in the Y axis of the column chart and when i try to filter the column chart with the date slicer it doesn't filter and dynamic column only shows the value as 1 and when I try to filter with the date slicer, column chart disappears.
what could be reason, why it's working?
User | Count |
---|---|
86 | |
84 | |
36 | |
34 | |
34 |
User | Count |
---|---|
93 | |
79 | |
66 | |
55 | |
52 |