Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Variable Range based on date filter

Hello!  I'm new user of PBI and I'm trying to create a graphic were shows me the range of KM per Item based on a Data Filter.  The range I'm trying to get is: 1. >= 1.000 KM 2. Between 1001 to 20...
  • v-danhe-msft's avatar
    8 years ago

    Hi Anonymous,

    Based on my test, you can refer to below steps:

    1.Create a new table to record your range of amount KM.

    2.Create a measure to calculate the changed amount KM.

    Val = var t=SUMMARIZE('Data Base','Data Base'[Item],"t7",CALCULATE(if(SUM('Data Base'[Amount KM])<=MAX('Table1'[Column2]) && SUM('Data Base'[Amount KM])>MIN('Table1'[Column3]),1)))

            return

            COUNTX(t,[t7])

    3.Create a Table visual and add the [Val] and [Column1] field.

    4.Create a Slicer visual and add the [Date] filed.

    Now you can see the result.

    You can also download the PBIX file to have a view.

    https://www.dropbox.com/s/eln6cm74539n2kl/Variable-Range-based-on-date-filter.pbix?dl=0

     

    Regards,

    Daniel He