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!

Text measure returns incorrect value under certain conditions when calculation group exists

I have attached a PBIX illustrating the issue.

 

The issue:

Under certain conditions, measures that return a text value will return incorrect results when a calculation group exists in the model (even if the calculation group is not applied).

 

Sample PBIX:

The problem measure is Stars UNICHAR 11088 (error).

The measure definition is:

Stars UNICHAR 11088 (error) = 
VAR SingleStar =
    UNICHAR ( 11088 ) -- Star character 11088 ""
VAR NumStars =
    [Selected Company]
VAR Result =
    REPT ( SingleStar, NumStars )
RETURN
    Result

This measure is intended to return a text value containing Unicode character 11088 repeated [Selected Company] times, where

Selected Company =
SELECTEDVALUE ( Company[Company ID] )

The model includes a calculation group with a single calculation item with expression

SELECTEDVALUE () & ""

This calculation group is not applied in the report, however.

 

Behaviour:

  1. In a table visual including Company ID and [Star UNICHAR 1108 (error)] (plus some other measures) with no filters applied, the measure always returns a single star.
    OwenAuger_0-1676260485034.png

     

  2. When Company ID is filtered on a single value, the measure returns expected results.OwenAuger_1-1676260536266.png
  3. The issue can be resolved by including an additional character in the repeated string, as in [Stars UNICHAR 11088 & zero-width space (ok)].
  4. It can also be resolved by using completely different characters, such as "X", as in [Repeated X (ok)].

 

Conditions that appear produce this behaviour:

  1. At least one calculation group exists in the model (even if not applied in the report).
  2. The calculation group must contain a nontrivial calculation item with an expression other than just SELECTEDMEASURE(). In this example, the expression is SELECTEDMEASURE() & ""
  3. The measure being visualized returns a text value by repeating a single character multiple times.
    This can be done with the REPT function or CONCATENATEX/GENERATESERIES.
  4. More than one "row" of results is returned in the visual.
    If we filter Company ID = 2 or 3, the [Stars UNICHAR 11088 (error)] measure returns the correct result.
  5. Only certain Unicode characters produce this behaviour.
    In my testing, characters in the range 11044-11512 mostly cause the bug, with some exceptions (e.g. 11400 & 11480). Characters outside the range 11044-11512 seem fine, e.g. 9733.
  6. The issue only occurs in Power BI visuals or DAX queries.
    If we produce a similar PivotTable in Excel, the measure returns correct results, presumably since the dataset is being queried with MDX. This suggests that this is a DAX engine issue.
Status: Investigating

Hi @OwenAuger 

You can put your issue to Ideas Forum , if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

Ideas (powerbi.com)

 

Best Regards,
Community Support Team _ Ailsa Tao

Comments
Joshrodgers123
Advocate IV

I had this same issue with UNICHAR() and calculation groups. Opened a support ticket and they couldn't figure it out. Had to use different Unichar characters as a workaround.

v-yetao1-msft
Community Support
Status changed to: Investigating

Hi @OwenAuger 

You can put your issue to Ideas Forum , if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

Ideas (powerbi.com)

 

Best Regards,
Community Support Team _ Ailsa Tao

Joshrodgers123
Advocate IV

@v-yetao1-msft - this is a bug, not a feature request/idea. I opened a support ticket a few months ago for the same issue, but there was no resolution.