Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hi
Here are samples, kindly help me with this I think if i get solved on this, then it will work
below i am providing some sample what i want is.
I want total days when i am selecting start and end date in range slicer then it gives me total days and that total days should not be affected by grade slicer if selecting any one of the grade
| Statrt Date | GradeCode |
| 01-03-2025 | 211287 |
| 01-03-2025 | 211287 |
| 02-03-2025 | 84693 |
| 02-03-2025 | 84693 |
| 02-03-2025 | 84693 |
| 03-03-2025 | 257533 |
| 03-03-2025 | 257533 |
| 03-03-2025 | 257533 |
| 03-03-2025 | 212202 |
| 03-03-2025 | 257533 |
| 04-03-2025 | 267520 |
| 04-03-2025 | 267520 |
| 04-03-2025 | 267520 |
| 05-03-2025 | 257533 |
Thank you
Solved! Go to Solution.
Hi @mdaatifraza5556 Try these please
DateTable = CALENDAR(MIN('YourTable'[Start Date]), MAX('YourTable'[Start Date]))Total Days =
VAR StartDate = MIN('DateTable'[Date])
VAR EndDate = MAX('DateTable'[Date])
RETURN DATEDIFF(StartDate, EndDate, DAY) + 1Total Days =
VAR StartDate = MIN('DateTable'[Date])
VAR EndDate = MAX('DateTable'[Date])
RETURN DATEDIFF(StartDate, EndDate, DAY) + 1Place the measure in a Card visual.
If this post helped please do give a kudos and accept this as a solution
Thanks In Advance
Create a separate dates dimension table and relate it to your fact table in a one-to-many relationship so the count of days doesnt get affected by Grade Code. Please see the attached sample pbix.
Create a separate dates dimension table and relate it to your fact table in a one-to-many relationship so the count of days doesnt get affected by Grade Code. Please see the attached sample pbix.
Thank you so much to all for the reply.
I got my solution, I was having an issues in the data modeling.
Hi @mdaatifraza5556 ,
Thank you @danextian for the helpful response!
Glad that your query got resolved.Kindly accept the solution that helped you or share your answer and accept is as solution.
Thank you.
Regards,
Pallavi.
Hi @mdaatifraza5556 Try these please
DateTable = CALENDAR(MIN('YourTable'[Start Date]), MAX('YourTable'[Start Date]))Total Days =
VAR StartDate = MIN('DateTable'[Date])
VAR EndDate = MAX('DateTable'[Date])
RETURN DATEDIFF(StartDate, EndDate, DAY) + 1Total Days =
VAR StartDate = MIN('DateTable'[Date])
VAR EndDate = MAX('DateTable'[Date])
RETURN DATEDIFF(StartDate, EndDate, DAY) + 1Place the measure in a Card visual.
If this post helped please do give a kudos and accept this as a solution
Thanks In Advance
Please try this
Total Days =
VAR MinDate = CALCULATE( MIN('Table'[StartDate]), REMOVEFILTERS('Table'[GradeCode]) )
VAR MaxDate = CALCULATE( MAX('Table'[StartDate]), REMOVEFILTERS('Table'[GradeCode]) )
RETURN
DATEDIFF(MinDate, MaxDate, DAY) + 1
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 23 | |
| 20 | |
| 18 | |
| 14 |
| User | Count |
|---|---|
| 58 | |
| 51 | |
| 40 | |
| 30 | |
| 24 |