Forum Discussion

Edimar90's avatar
Edimar90
Frequent Visitor
3 years ago
Solved

filtro dinamico

Buen dia!

 

habra alguna forma de mostrar solo la informacion del mes vencido ?

Gracias!!

  • Yes, you can create a dynamic filter in Power BI to show only the information for the expired month. Here are the steps:

    1. Create a new measure to calculate the latest month in your data. For example, if your data goes up to February 2022, the latest month would be "2022-02". The formula for this measure could be something like:

       
      Latest Month = MAX('Table'[Date])
    2. Create a new measure to calculate the number of months between the latest month and each month in your data. For example, if your data goes up to February 2022, the number of months between the latest month and January 2022 would be 1, and the number of months between the latest month and December 2021 would be 2. The formula for this measure could be something like:

       
      Months From Latest = DATEDIFF([Latest Month], 'Table'[Date], MONTH)
    3. Create a new measure to filter the data based on the number of months from the latest month. For example, to show only the information for the expired month (i.e. the latest month), you would set the filter to 0. The formula for this measure could be something like:

       
      Expired Month Filter = IF([Months From Latest] = 0, 1, 0)
    4. Apply the filter to your visualizations using the "Visual level filters" option in the "Filters" pane. Select your new measure ("Expired Month Filter") and set the filter type to "Basic filtering" and the filter value to "is equal to" 1.

    This should show only the information for the expired month in your visualizations. Note that you may need to adjust the formulas and filter settings depending on the structure of your data.

1 Reply

  • MAwwad's avatar
    MAwwad
    Solution Sage

    Yes, you can create a dynamic filter in Power BI to show only the information for the expired month. Here are the steps:

    1. Create a new measure to calculate the latest month in your data. For example, if your data goes up to February 2022, the latest month would be "2022-02". The formula for this measure could be something like:

       
      Latest Month = MAX('Table'[Date])
    2. Create a new measure to calculate the number of months between the latest month and each month in your data. For example, if your data goes up to February 2022, the number of months between the latest month and January 2022 would be 1, and the number of months between the latest month and December 2021 would be 2. The formula for this measure could be something like:

       
      Months From Latest = DATEDIFF([Latest Month], 'Table'[Date], MONTH)
    3. Create a new measure to filter the data based on the number of months from the latest month. For example, to show only the information for the expired month (i.e. the latest month), you would set the filter to 0. The formula for this measure could be something like:

       
      Expired Month Filter = IF([Months From Latest] = 0, 1, 0)
    4. Apply the filter to your visualizations using the "Visual level filters" option in the "Filters" pane. Select your new measure ("Expired Month Filter") and set the filter type to "Basic filtering" and the filter value to "is equal to" 1.

    This should show only the information for the expired month in your visualizations. Note that you may need to adjust the formulas and filter settings depending on the structure of your data.