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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

HasOneFilter & HasOneValue not working in service

Hello Team,

 

It seems that HasOneFilter and HasOneValue if used in a measure of a dataset connected with DirectQuery the measure breaks when result is FALSE TRUE. The issue occurs once the report is published on Power BI Service. It works in Power BI Desktop.

 

Regards,

Prateek Raina

Status: Needs Info
Comments
v-jiascu-msft
Employee

Hi Prateek,

 

How can I reproduce it? I tested it like this:

Measure =
IF ( HASONEVALUE ( StreamingDS[id] ), VALUES ( StreamingDS[id] ), 9999 )

Has_One_Filter_Has_One_Value_not_working_in_service

 

Best Regards,

Dale

Vicky_Song
Impactful Individual
Status changed to: Needs Info
 
prateekraina
Memorable Member

Hi @v-jiascu-msft,

 

My Bad, the issue occurs when the result is TRUE.

Make sure you are using DirectQuery and publish the report on service to reproduce the issue.

 

Steps to Reproduce:

1. Connect to a Date Dimension table in Azure SQL DB.

2. Create following measures:

HasOneFilter = IF(HASONEFILTER(DimDate[YearName]),"True","False")
HasOneValue = IF(HASONEVALUE(DimDate[YearName]),"True","False")

3. Create YearName slicer and Drag two cards to place these measures:

Solution1.PNG

4. Publish the report on Power BI Online. Open the report and choose any value in slicer. It will break the card visuals.

Solution2.PNG

5. Here is the error:

Solution3.PNG

I hope these steps helps you in reproducing the issue.

 

Prateek Raina

prateekraina
Memorable Member

Hi @v-jiascu-msft,

 

Can you kindly provide an update on this?

 

Prateek Raina

Anonymous
Not applicable

I can confirm this issue. This took many month and dozens if not hundreds of hours to track down, since our measures are pretty complex. 

 

Have a ticket open for a while, but no response from MS support.

 

 

prateekraina
Memorable Member

@Anonymous Hit the thumbs up button so that the issue is highlighted.