last 10 days data based on Date&time

0 votes
i have Date & time dimensions

i need to display filter slicer showing Last 10 days data  -- then data showing only last 10 days data.

slicer

last 10 days

data like

Region, Date, country, state

......
Jun 4 in Power BI by vnk
• 290 points
119 views

1 answer to this question.

0 votes

Hi, @Vnk,

Regarding your query, you have to follow few steps given below:

  • You can use the relative date slicer just like any other slicer. Create a slicer visual for your report and then select a date value for the Field value. In the following image, we selected the OrderDate field.
  • Select the slicer on your canvas and then the carat in the upper-right corner of the slicer visual. If the visual has date data, the menu displays the option for Relative.
  • For the relative date slicer, select Relative.
  • You can then select the settings.
  • For the first set in the relative date slicer, you will have to choose:  Last 
  • The second (middle) setting in the relative date slicer lets you enter a number to define the relative date range that is: 10
  • The third setting lets you pick the date measurement. You will have to choose: days

Now data that you can see will be the last 10 days data.

I hope this will help you.

answered Jun 4 by Gitika
• 31,310 points
Thanks for reply this date slicer.

i don't want to that type of filter. we need dax calculation for Last 10 days data. showing in the slicer.

Hi, @Vnk,

For that first you have to follow few steps mentioned below:

  • Go to your PowerBi dashboard-> click ok Get Data-> (scroll down)-> select SQL server.
  • Give a name to your SQL server and provide your Database name and click OK.
  • It will get loaded where it will be connected to the SQL server. Select the table name where you have all your data and click on Load.
  • The Table will get loaded. Click on the Data view (left of you PowerBi Dashboard), there you will see your table data(region, data, Country, State).
  • Now you have to click on New Column(which will be in your top right side on the dashboard). There you will get a column to write your DAX related stuff.
  •  By default, you will see the column name and just remain that according to your choice and write the DAX  as:
DateTime  = Day(table_name(Region, Date, Country, Name))

After writing the DAX calculation press enter, automatically there will be a column that will show the data according to the query.

Hey, @Vnk,

Regarding the same query, you can visit here, I have explained in steps hope that it will be helpful for you: https://www.edureka.co/community/71307/last-10-days-data-based-on-date-time

Related Questions In Power BI

0 votes
1 answer

What options do I have for viewing and working with data on premises

There are three ways to achieve the ...READ MORE

answered Oct 15, 2018 in Power BI by Hannah
• 18,060 points
37 views
0 votes
1 answer

Power BI : Time-based drill downs powered by Azure Data Warehouse

I don't really think you need to ...READ MORE

answered Oct 29, 2018 in Power BI by Shubham
• 13,380 points
175 views
0 votes
1 answer

Locating closest match based on Latitude & Longitude

First of all, we need to use the ...READ MORE

answered Jan 2, 2019 in Power BI by Shubham
• 13,380 points
732 views
0 votes
1 answer

How to create final table based on Joins of two tables in power BI?

Hi Nithin, It is easy and simple. 1. Go ...READ MORE

answered Mar 1, 2019 in Power BI by Cherukuri
• 32,460 points
4,415 views
+2 votes
0 answers

Assume referential integrity

1) What is Assume referential integrity? what ...READ MORE

Aug 19, 2019 in Power BI by vnk
149 views
+2 votes
1 answer

If Condition

DAX - I assume [Claim_line].[Allowed_Amount_B6] is one ...READ MORE

answered Aug 20, 2019 in Power BI by anonymous
• 32,460 points
113 views
+2 votes
1 answer

How to export data to CSV from power bi embedded url ?

Hi Arathi, You can open Visuals from embedded ...READ MORE

answered Aug 23, 2019 in Power BI by anonymous
• 32,460 points
1,741 views
+1 vote
1 answer

Power Bi to Machine Learning Model

Hello @vnk! Power BI only supports Azure Machine ...READ MORE

answered Dec 3, 2019 in Power BI by Priyanka
208 views
0 votes
1 answer

Dynamic title Based on Date

Hi, @Vnk, You can try this: [Date(WindowMax)(Title)] = WINDOW_MAX( ...READ MORE

answered Jun 15 in Power BI by Gitika
• 31,310 points
23 views
0 votes
1 answer

Dax Calculations on Date&time

Hey, @Vnk, I hope you have a data ...READ MORE

answered 3 days ago in Power BI by Gitika
• 31,310 points
98 views