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
Anonymous
Not applicable

Filter data per day in the report

Hello,

 

I have generated data for 150 employees for the last 5 years. In my SQL table.

Currently, I have data like this in my table

 

Employee IdEmployment start dateEmployment end dateTrend dataSalaryFTE
101/01/201501/01/202001/01/20151000,000,60
101/01/201501/01/2020Continue till 01/01/20202000,000,80
101/01/201501/01/202001/01/20203000,001,00
201/01/201501/01/202001/01/20151000,000,60
201/01/201501/01/2020Continue till 01/01/20202000,000,80
201/01/201501/01/202001/01/20203000,001,00

 

 

I don't want to show all data in the report per day but I want to show only 1 line per employee in the report. I have to show filter on Trend date and Once the user selects Trend date then data should be SUM like Salary or FTE.

 

Do I need to create a measure for Salary and FTE based on SUM? If so then Do I need to include TrendDate field on my grid?

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Anonymous ,

 

I don’t think you need to create another measure. Just remove "Trend data" column from your table visual.

employee-don't.jpgemployee.PNG

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Icey
Community Support
Community Support

Hi @Anonymous ,

 

I don’t think you need to create another measure. Just remove "Trend data" column from your table visual.

employee-don't.jpgemployee.PNG

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

maybe I didn't understand what the real need is, but part of the problem, at least, can be easily dealt with in power query with the table.group function

 

image.png

 

 

image.png

 

 

image.png

 

 

Anonymous
Not applicable

Hi Rocco,

 

Thank you for your reply. I can do that but I have a date range. When a user selects a specific date then It should sum the data based on the selected date. I have around or less than 1 Million data for a direct queries. 

Anonymous
Not applicable

hi @Anonymous ,

then you want a function that has in input an ID and a data range i.e. {data1,data2}   and should output the salary sum (FTE sum) for that ID for days from data1 to data2?

Greg_Deckler
Super User
Super User

@Anonymous - Sorry, I'm not quite following. Maybe use a MAX or MIN aggregation? What would be an expected result from the sample data you provided?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi Greg,

 

The data is just an example. I have a lot of data around 6 Million.

I have created a filter on TrendDate in the report and created a measure like this to calculate the sum of FTE based on date selection on date slicer.

 

SumFTE= CALCULATE(SUM(Employee_WorkerTrend[FULLTIMEEQUIVALENCY]),
FILTER(Employee_WorkerTrend,
Employee_WorkerTrend[TRENDDATE]<=MIN(Employee_WorkerTrend[TRENDDATE]) &&
Employee_WorkerTrend[TRENDDATE]>=MAX(Employee_WorkerTrend[TRENDDATE])))

 

After using this measure in my report grid, I get below error.

The resultset of a query to an external data source has exceeded the maximum allowed size of '1000000' rows.

 

Is this a correct approach or should be managed in another way.

 

Note: I am using directQuery for this report.

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.

Top Solution Authors
Top Kudoed Authors