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.
How can I reproduce it? I tested it like this:
IF ( HASONEVALUE ( StreamingDS[id] ), VALUES ( StreamingDS[id] ), 9999 )
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:
4. Publish the report on Power BI Online. Open the report and choose any value in slicer. It will break the card visuals.
5. Here is the error:
I hope these steps helps you in reproducing the issue.
Can you kindly provide an update on this?
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.
@iasg5991 Hit the thumbs up button so that the issue is highlighted.