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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
cbhami02
New Member

If Date = x Then select value y

Hello,

I can't seem to find what I am looking for but basically I need to create a rolling calendar where:

Column A         Column B                      Goal (200)

Day 1                      5%                                 10

Day 2                      10%                                20

Day 3                       15%                               30

 

If date = day 3, then 200 x 15% = 30

 

I don't know how to list that in DAX so it is difficult to look up. Thank you!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@cbhami02 

I create a sample pbix, basically if you have a date, you can follow my dax formula.

 

Rank day = RANKX(FILTER('Table',[Date].[Month]=EARLIER([Date].[Month])),[Date],,ASC)
Percent = [Rank day]/CALCULATE(COUNTROWS('Table'),ALLEXCEPT('Table','Table'[Date].[Month]))
Goal = 200 * [Percent]

Vpazhenmsft_0-1634286475967.png

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@cbhami02 

I create a sample pbix, basically if you have a date, you can follow my dax formula.

 

Rank day = RANKX(FILTER('Table',[Date].[Month]=EARLIER([Date].[Month])),[Date],,ASC)
Percent = [Rank day]/CALCULATE(COUNTROWS('Table'),ALLEXCEPT('Table','Table'[Date].[Month]))
Goal = 200 * [Percent]

Vpazhenmsft_0-1634286475967.png

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@cbhami02 , I am not sure How % is coming.

 

Usually, if this column and you need rolling then 

 

day can be date

New Column =

sumx(filter(Table, [Day] <=earlier([Day] ),[Percent]) *200

 

 

measure =

sumx(filter(allselecetd(Table), [Date] <=max([Date] ),[Percent]) *200

 

 

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

The percent would be the number of work days in the month, so usually 19-20. In this example, 20.

 

I know how to do a VLOOKUP in excel to have -

Total Mission x (VLOOKUP % based on day of the month(=Today that updates when I open the excel)) = 200*percent = by day 5 of the month, you should be at 50 widgets produced.

 

Let me try those measures

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.