Forum Discussion

RegionH's avatar
RegionH
Icon for Helper I rankHelper I
2 years ago
Solved

Duplicated rows when adding a measure to a table visual

I have a datamodel where I have a fact table 'ZMM_INDI - uden dubletter'. This table is connected to a dimension table 'Suppliers' on Supplier ID. The table suppliers has more suppliers than represen...
  • HotChilli's avatar
    2 years ago

    The whole row is not duplicated.  What you see is powerbi giving you all the combinations of the dimension and fact table for which the measure returns a non-blank value.

    This part

    IF(
            TotalAntal = 0,
            0,

    returns a 0 for all rows where the measure Beholdning minus udløbet is 0.  I don't know what that measure does but it looks like it returns 0 for all the combination that could be in the visual

    --

    In powerbi, we sometimes use this feature to our advantage by adding 0 to a measure, for example, show me all the customers who have sales and also show me the customers who have no sales.  The measure above does something similar

     

    --

    In any powerbi visual, when a measure returns blank, the rows will be removed from that visual.