Forum Discussion

BeemsC's avatar
BeemsC
Resolver III
8 years ago
Solved

Dial Gauge problem

Hello experts,

I have an interesting problem.
For my sales dashboard i need to make an actual target in the custom visual ''Dial Gauge''.
The database looks like this:


The filter and Dial gauge look like this:
We use the following formula at the moment to get the target (point where orange goes to green)

PrognosemarginYTD = (SUM(tbl_aw_VC672_progmarginsalesperson[Progn_Margin_Amount]) / SUM('YEAR'[NumberOfDays]))*SUM('YEAR'[CurrentDay])


The problem is, it is not dynamic at the moment when i try filtering on months.
Ive tried creating a target for each month, but it doesnt work since its far away from 100% always at the start of the month..

Basically the problem is, that when u select the latest month to filter it gets all days.
But i only want to filter the days of this month uptil now .. So only 6 days for today

I have a Dim_date table

Does anyone have any ideas?

 

  • Fixed it by removing everything after today in my OrdinalDate column (1-365)

3 Replies

  • BeemsC's avatar
    BeemsC
    Resolver III

    I had an idea:
    I use the following formula:

    Target new = DISTINCTCOUNT(DIM_DATUM[DAY_OF_YEAR]) * [Prognmargin_Amount_1day_mes]


    Is it possible to say the day of year cant exceed the current day of year. So in this case like 270 or something.
    I already have a formula which calculates current day ..

    Thanks in advance !

     

    • BeemsC's avatar
      BeemsC
      Resolver III

      I've tried the following:

      Target = IF(DISTINCTCOUNT(DIM_DATUM[DAY_OF_YEAR]) < [Current day];DISTINCTCOUNT(DIM_DATUM[DAY_OF_YEAR]) * [Progn_Amount_1day_mes])

      But it doesn't work, because when i go in the 10th month now, target goes to 0

       

      • BeemsC's avatar
        BeemsC
        Resolver III

        Fixed it by removing everything after today in my OrdinalDate column (1-365)