Forum Discussion

Fenrir's avatar
Fenrir
New Member
4 years ago
Solved

How to set default value to the table when there is no data existing at all?

Hello all,   After couple months of practicing using Power Bi (which is pretty staggeringly neat tool) I need to make my very first question which I seem to be unable to solve on my own. The case i...
  • Fenrir's avatar
    4 years ago

    Okay, to answer to myself, I think I got this.

    I did test this out and created a separated table for the default values like this:

    vw_defaultloadingplaces = {
    (1, "LOADING PLACE 1", 0, 0, DATEVALUE(TODAY())),
    (2, "LOADING PLACE 2", 0, 0, DATEVALUE(TODAY())),
    (3, "LOADING PLACE 3", 0, 0, DATEVALUE(TODAY())),
    (4, "LOADING PLACE 4", 0, 0, DATEVALUE(TODAY())),
    (5, "LOADING PLACE 5", 0, 0, DATEVALUE(TODAY())),
    (6, "LOADING PLACE 6", 0, 0, DATEVALUE(TODAY())),
    (7, "LOADING PLACE 7", 0, 0, DATEVALUE(TODAY()))
    }

    Then I built up a visual based on this table. At first I though I need to create measures to sum those 0 values with Amounts etc. but it actually seem to work without doing so too (since loadingdate is filtered with relative date is this date and loading place names are identical and connected using manage relationships).

    So now I got the table visual which does show the 0 values too.

    There's certain relationships I need to create in order to make it fully compatible with the existing data (different unit types mess it up etc), but this actually was a working solution for it.

    Thanks anyway!

     

     

    Hopefully this helps someone else with similar challenge someday. 🙂