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
mukhan169
Helper III
Helper III

Data offset Issue

Thanks to Community Support Team 

I have solve most of the issues. Just the following issue left.

 

I need to offset data.
For 3 MIS it should calculate IPTV up till (current month-4), for 12 MIS it should calculate the IPTV uptill (current month -13) and for 24 month of service it should calculate IPTV uptill (current month -25).
For 3 MIS it should stop the IPTV on Oct 2018.
3 MIS Stoppage.PNG

For 12 MIS 

12 MIS Stoppage.PNG

And there shouldnt be any data for 24 MIS. I am uploading  the sample pbix file.

 

Sample

 

Thanks in advance for your help.

1 ACCEPTED SOLUTION

 
 
_maxdate =
var ThreeMISCutoff =DATE(YEAR(NOW())|MONTH(NOW())-4|DAY(NOW()))
var TwelveMISCutoff =DATE(YEAR(NOW())|MONTH(NOW())-12|DAY(NOW()))
var TwentyFourMISCutoff =DATE(YEAR(NOW())|MONTH(NOW())-24|DAY(NOW()))
return
if(MAX(MIS[MIS])=3 && max(Dates[Date])<=ThreeMISCutoff|[IPTV]|

IF(MAX(MIS[MIS])=12 && max(Dates[Date])<=TwelveMISCutoff|[IPTV]|
IF(MAX(MIS[MIS])=24 && max(Dates[Date])<=TwentyFourMISCutoff|[IPTV]|
if(MAX(MIS[MIS])=3 && max(Dates[Date])>=ThreeMISCutoff|[IPTV]|BLANK())
)
))
 
 
That did it. Please let me know if there is a better way.
 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @mukhan169 ,

You can add if statement to check current row contains data and mis group, then use them to compare with today function to filter unmatched records.

Regards,

Xiaoxin Sheng

@Anonymous  I am new to Dax can you provide me some examples please?

 
 
_maxdate =
var ThreeMISCutoff =DATE(YEAR(NOW())|MONTH(NOW())-4|DAY(NOW()))
var TwelveMISCutoff =DATE(YEAR(NOW())|MONTH(NOW())-12|DAY(NOW()))
var TwentyFourMISCutoff =DATE(YEAR(NOW())|MONTH(NOW())-24|DAY(NOW()))
return
if(MAX(MIS[MIS])=3 && max(Dates[Date])<=ThreeMISCutoff|[IPTV]|

IF(MAX(MIS[MIS])=12 && max(Dates[Date])<=TwelveMISCutoff|[IPTV]|
IF(MAX(MIS[MIS])=24 && max(Dates[Date])<=TwentyFourMISCutoff|[IPTV]|
if(MAX(MIS[MIS])=3 && max(Dates[Date])>=ThreeMISCutoff|[IPTV]|BLANK())
)
))
 
 
That did it. Please let me know if there is a better way.
 

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.