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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Margreet
Helper II
Helper II

DAX formula

Hi, I got a simple model only a date table and a table with Nr, StartDate, Enddate.

The date from datetable is connected to Startdate.

 

In the visualisatie I want to see a 1 in every quarter from start to end date.

For example nr 1 with startdate 1-2-2021 and enddate 1-8-2022. What for formula in Dax works?

 

Thank for reaction.

 I want to see this:

Margreet_0-1668548896989.png

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Margreet,

It seems like a common multiple date fields analysis requirement, you can take look at the following blog start date end date part if it helps:

Before You Post, Read This 

In addition, you can also try to create a calculated table to expand these date ranges and use it as bridge to mapping raw table records:

Solved: Spread revenue across period based on start and en... - Microsoft Power BI Community

Regards,

Xiaoxin Sheng

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Margreet,

It seems like a common multiple date fields analysis requirement, you can take look at the following blog start date end date part if it helps:

Before You Post, Read This 

In addition, you can also try to create a calculated table to expand these date ranges and use it as bridge to mapping raw table records:

Solved: Spread revenue across period based on start and en... - Microsoft Power BI Community

Regards,

Xiaoxin Sheng

amitchandak
Super User
Super User

@Margreet , I think these blogs can help

 

Power BI Dax Measure- Allocate data between Range: https://youtu.be/O653vwLTUzM
https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-o...

 

 

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hello, I tried now this: 

Count_active_in_period = CALCULATE(COUNTx(FILTER('Table','Table'[StartDate]<=max(Datetable[Date]) && 'Table'[Enddate]>max(Datetable[Date])),('Table'[nr])),CROSSFILTER('Table'[StartDate],Datetable[Date],None))
 
Margreet_1-1668602896448.png

In 2021_Q2: I want to see 2; this is nr 1 and nr 3 are active in that period.

Hope some know what I can do in the formule, thanks a lot!

 

Margreet_2-1668602985729.png

 

Great, thank you! I will try working this.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.