cancel
Showing results for 
Search instead for 
Did you mean: 

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
Community Support Team

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

Established Member
Status changed to: Needs Info
 
New Contributor

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

New Contributor

Hi @v-jiascu-msft,

 

Can you kindly provide an update on this?

 

Prateek Raina

Frequent Visitor

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.

 

 

New Contributor

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