Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I am trying to update a value in a calculated column using a slicer selection, to allow the user to see the effect of allowing a greater time to time to pay.
I have set up a seperate table containing the values for the slicer that is not linked and I am using the below statement
Hi,
it is not possible to update a calculated column from slicer selection, I'm afraid. You would have to handle it as a measure.
cheers,
S
Thanks is there any workaround for this?
yes, but it depends on what you want to achive. Do you want a list of customers and which category they are in, or the count of customers pr category? Or filter on a category?
I want to be able to see the count of customer in each category and then use the category as a filter.
Hi @Anonymous ,
The measure is dynamic but the calculated columns are computed during the database processing and then stored in the model. So In your scenario, we cannot make the calculated column dynamically.
If you want to give customer a type depends on another measure, you can try the following steps.
Create a table contain all the types
create a measure to count by type
TypeCount = COUNTROWS ( FILTER ( ADDCOLUMNS ( ALL ( FinalImport ), "Type", IF ( 'FinalImport'[Clearing Date] = BLANK (), "3.Poor Payers", IF ( [DAYS TO PAY] <= 0, "1.Good Payers - On Time", IF ( [paysegcheck] = 0, "2.Average Payers", IF ( [paysegcheck] = 1, "3.Poor Payers" ) ) ) ) ), [Type] = SELECTEDVALUE ( TypeTable[Type] ) ) )
The "check" slicer control the measure paysegcheck
BTW, pbix as attached.
Best regards,
Community Support Team _ DongLi
If this post helps, then please consider Accept it as the solution to help the other members find it more
@Anonymous,
out of curiosity, what does the code for you measure [paysegcheck] look like?
so if I wanted to just show on a chart two lines one for actual days to pay and one for days to pay - my slicer value, what would be the best way to do this?
If you have a separate table,Categories, with 1 column,Category, and Poor, Average and Good on the rows, create a measure like this:
countPrCategory = SWITCH ( TRUE (); SELECTEDVALUE ( 'Categories'[Category] ) = "Poor"; CALCULATE ( DISTINCTCOUNT ( Table[customerID] ); FILTER ( Table; ISBLANK ( Table[clearing date] ) || [paysegcheck] = 1 ) ); SELECTEDVALUE ( 'Categories'[Category] ) = "Average"; CALCULATE ( DISTINCTCOUNT ( Table[customerID] ); FILTER ( Table; [paysegcheck] = 0 ) ); SELECTEDVALUE ( 'Categories'[Category] ) = "Good"; CALCULATE ( DISTINCTCOUNT ( Table[customerID] ); FILTER ( Table; [days to pay] <= 0 ) ); 0 )
If you also want to filter on these categories, add this measure to the filter part of the visual(s), and set it to greater than 0
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
76 | |
61 | |
37 | |
33 |
User | Count |
---|---|
99 | |
56 | |
51 | |
42 | |
40 |