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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

@v-shex-msft  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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.