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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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