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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
logicscience2
Regular Visitor

how to select a rating value for a date with multiple rows per date

I have some data coming in to a report like this:

logicscience2_0-1715303282889.png

Date - is from a calendar table

Level - is from my data source which is related to calendar by date

rank and day_summary - are from a data entry table constructed as shown on the right and related to my data source by level.

 

I want to show a 100% stacked column chart where the x-axis is 'month' from the calendar table and the columns are the distribution of day_summary as defined by rank.

 

The data source contains multiple events per day as rows or no rows per day if there are no events.

The rank defines an overall summary of the day. For example on 6th February there was two events; one at level 2 and one at level -1. I want this day to be categorised as a "productive day" according to it containing rank =1 on one row.

The lowest rank value per day gives the day_summary.

 

As there are some days where there is no events, I want these to be classed as "neutral day", (rank 5) but since the data source contains no events, I'm not sure how to make this classification exist.

 

So the 100% stacked bar chart can then show a day summary for 29 out of 29 days of February, 31 out of 31 for March, 30 out of 30 for April and so on. With the ranking (or day_summary) being the stacked legend. One value per day, that being the minimum of 'rank'

 

I am creeping closer to what I want to achieve by merging my source data with the rank table so each row has a rank and day_summary for the event but this leaves the empty values for days with no events which should be classed as rank = 5

 

logicscience2_1-1715305309685.png

 

But this doesn't return the day_summary which is more informative than rank and I really want the complete solution on a 100% stacked bar chart.

 

Any advice or pointers?

 

 

 

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @logicscience2 ,

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
logicscience2
Regular Visitor

{Thought} - my data source is actually a python script which creates a data frame by analysing a spreadsheet. I am wondering if I should update the python to input missing values for days when there are no events and thus create a rank and day_summary for all days.

 

But that still leaves the problem of selecting the minimum value per date for the 100% stacked bar chart visual.

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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