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
niyaz006
Frequent Visitor

DAX to show same value for missing months

My data

CategorySub categoryDateValue
Cat1Subcat11-Jan1
Cat1Subcat21-Jan1
Cat2Subcat31-Jan1
Cat2Subcat41-Jan1
Cat1Subcat11-Feb2
Cat1Subcat21-Mar2
Cat2Subcat41-Mar3

 

The value ranges from 1 to 5. I am looking to create a table like below

 

Month#Value 1s#Value 2s#Value 3s# Value 4s# Value 5s
1-Jan40000
1-Feb31000
1-Mar1(1+1)

1

00

 

In Feb, 1 entry's has value changed to 2. Hence, that row from the previous month is ignored, but every other record (3 x 1s) is counted

I tried something like the below:

 

Cumulative Value Count = 
CALCULATE(
    COUNTROWS(SUMMARIZE(Table, [Cat], [Subcat])),
    FILTER(ALL(Table[date]), 
        Table[startdate] <= MAX(Table[date])
        )
    )

 

 But my output was (it is not reducing the value 1s when they have moved to 2s and 3s, ....

Month#Value 1s#Value 2s#Value 3s# Value 4s# Value 5s
1-Jan40000
1-Feb41000
1-Mar4100

 

Any help/guidance?

2 REPLIES 2
VahidDM
Super User
Super User

Hi @niyaz006 

 

can you please add more details about the output? what are those values1 to values 5 in the table? 

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

The value column can have values from the range (1 to 5). These are like levels. Level 1 to 5. The Level might increase from 1 to 2 in a month or 2 or even more. Lets say a metric Category 1 and Subcategory1 is Level 1 in Jan. We will get this data. The next time we get the data is when it changes to Level 2. Lets say it happens in March. So I need to show Level 1 in Jan and Feb. And Level 2 from March.

 

In the output table, I am summarising how many metrics are in level 1 to level 5 in each month.

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.