March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
1 = VAR SELECTED = IF(HASONEVALUE(Sectors[Sectors]),Values(Sectors[Sectors]),"Any") Return CALCULATE(COUNT('Occupier Data'[Out of all of the above Criteria which was of most importance? 1]),filter('Occupier Data','Occupier Data'[Out of all of the above Criteria which was of most importance? 1]=EARLIER('Sector Preferences'[Preferences])),filter('Occupier Data','Occupier Data'[Sector]=SELECTED))
My second challenge is to then enable the calculation of the count when a user does not make a selection ( where the variable Selected becomes "Any". In excel I would use a Wildcard as a criteria but I cannot seem to get to the bottom of how to do this.
Any help would be greatly apprieciated.
Solved! Go to Solution.
Hi @chris_PowerBI ,
The measure is dynamic but the calculated columns and tables are computed during the database processing and then stored in the model. So In your scenario, we cannot make the calculated column and tables dynamically.
We can use a table visual with your 'Sector Preferences'[Preferences] and following measure as field to meet your requirement:
Measure = VAR SELECTED = IF ( HASONEVALUE ( Sectors[Sectors] ), VALUES ( Sectors[Sectors] ), "Any" ) RETURN CALCULATE ( COUNT ( 'Occupier Data'[Out of all of the above Criteria which was of most importance? 1] ), FILTER ( 'Occupier Data', 'Occupier Data'[Out of all of the above Criteria which was of most importance? 1] = IF ( HASONEVALUE ( 'Sector Preferences'[Preferences] ), VALUES ( 'Sector Preferences'[Preferences] ) ) ), FILTER ( 'Occupier Data', 'Occupier Data'[Sector] = SELECTED ) )
Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @chris_PowerBI ,
The measure is dynamic but the calculated columns and tables are computed during the database processing and then stored in the model. So In your scenario, we cannot make the calculated column and tables dynamically.
We can use a table visual with your 'Sector Preferences'[Preferences] and following measure as field to meet your requirement:
Measure = VAR SELECTED = IF ( HASONEVALUE ( Sectors[Sectors] ), VALUES ( Sectors[Sectors] ), "Any" ) RETURN CALCULATE ( COUNT ( 'Occupier Data'[Out of all of the above Criteria which was of most importance? 1] ), FILTER ( 'Occupier Data', 'Occupier Data'[Out of all of the above Criteria which was of most importance? 1] = IF ( HASONEVALUE ( 'Sector Preferences'[Preferences] ), VALUES ( 'Sector Preferences'[Preferences] ) ) ), FILTER ( 'Occupier Data', 'Occupier Data'[Sector] = SELECTED ) )
Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
89 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |