Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Bharathpowerbi
New Member

Regarding hash one value dax function

Regarding hash one Value dax function it supports cross filter right it is not working.

Created hashonevalue on segment column trying to filter on country column but not filtering.

1000090527.jpg

1 ACCEPTED SOLUTION
DataNinja777
Super User
Super User

Hi @Bharathpowerbi ,

 

The reason your hashonevalue measure isn't returning a result when filtering by Country is because of how HASONEVALUE(financials[Segment]) works. Your formula:

hashonevalue = IF(HASONEVALUE(financials[Segment]), SUM(financials[Profit]), BLANK())

only returns the profit if exactly one segment is selected. When you select France in the Country slicer, it may still include multiple segments in the data, so HASONEVALUE returns false, and the measure shows blank. This is expected behavior, not a cross-filtering issue.

To confirm how many segments are active under the current filters, you can add:

Selected Segment Count = DISTINCTCOUNT(financials[Segment])

If this count is greater than one, your original measure will remain blank. The measure is working as designed, but the result depends entirely on the data context created by your slicers.

 

Best regards,

View solution in original post

5 REPLIES 5
v-sdhruv
Community Support
Community Support

Hi @Bharathpowerbi ,
Just wanted to check if you had the opportunity to review the suggestions provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You

v-sdhruv
Community Support
Community Support

Hi @Bharathpowerbi ,
Just wanted to check if you had the opportunity to review the suggestions provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You

v-sdhruv
Community Support
Community Support

Hi @Bharathpowerbi ,
Just wanted to check if you had the opportunity to review the suggestions provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You

DataNinja777
Super User
Super User

Hi @Bharathpowerbi ,

 

The reason your hashonevalue measure isn't returning a result when filtering by Country is because of how HASONEVALUE(financials[Segment]) works. Your formula:

hashonevalue = IF(HASONEVALUE(financials[Segment]), SUM(financials[Profit]), BLANK())

only returns the profit if exactly one segment is selected. When you select France in the Country slicer, it may still include multiple segments in the data, so HASONEVALUE returns false, and the measure shows blank. This is expected behavior, not a cross-filtering issue.

To confirm how many segments are active under the current filters, you can add:

Selected Segment Count = DISTINCTCOUNT(financials[Segment])

If this count is greater than one, your original measure will remain blank. The measure is working as designed, but the result depends entirely on the data context created by your slicers.

 

Best regards,

Sourav_M
Frequent Visitor

Hi @Bharathpowerbi  - Can you please elaborate what exactly you are looking for and what is that iscrossfiltered measure, to analyse the problem statement.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.