Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
A_random_user
Regular Visitor

How to create separate chart for each day

Hello all. I'm a fairly new user to Power BI, and I was wondering if there was a way to acomplish the following with power BI's features. I would appreciate any guideance and suggestions you have to offer, or further resources on this topic.

 

Say I have data arranged in an Excel sheet like so:

A_random_user_0-1625442123330.png

I plan to update this excel sheet daily with new entries and refresh the Power BI data with it. The data may or may not follow the same consistency (number of time samples on a given day) each time.

 

My questions: Is there a way to create a button or box that would allow a user to 1) enter/select a date that currently exists in the dataset (e.g. 7/5/2021) without having to have prior knowledge of the dates in the database (maybe like an automaticly generated list that detects and displays all unique dates from the Date column), and 2) display a chart of only that date's Times on the X-axis vs the Occupancy, Temperature, and Humidity on the Y-axis? 3) Is there a better way to arrange the Excel data to acomplish this goal?

 

Thanks in advance for all submissions!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@A_random_user , Based on what I got, Create an independent date table and what if parameter 

user can select a date and int value in what if

 

measure =

var _max = maxx(allselected('Date'), 'Date'[Date])

var _int = selectedvalue(Param[Param])

var _min = _max - _int

return 

calculate( countrows(table), filter(Table, Table[Date] >=_min && Table[Date]<=_max))

 

Add this measure with un summarized column, visual will filter 

Need of an Independent Table in Power BI: https://youtu.be/lOEW-YUrAbE

 

https://docs.microsoft.com/en-us/power-bi/desktop-what-if

 

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@A_random_user , Based on what I got, Create an independent date table and what if parameter 

user can select a date and int value in what if

 

measure =

var _max = maxx(allselected('Date'), 'Date'[Date])

var _int = selectedvalue(Param[Param])

var _min = _max - _int

return 

calculate( countrows(table), filter(Table, Table[Date] >=_min && Table[Date]<=_max))

 

Add this measure with un summarized column, visual will filter 

Need of an Independent Table in Power BI: https://youtu.be/lOEW-YUrAbE

 

https://docs.microsoft.com/en-us/power-bi/desktop-what-if

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.