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

How to get Target date changed count in power bi dax

Hi Team,

I want to get Target date change count in calculated column. how to create formula for that.

WidLTSlts change count
16/11/20231
16/11/20231
112/11/20231
23/10/20230
23/10/20230
312/11/20232
33/10/20232
33/10/20232
36/11/20232
412/11/20232
43/10/20232
43/10/20232
46/11/20232
56/11/20230
56/11/20230
1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

4 REPLIES 4
Ahmedx
Super User
Super User

pls try

Screenshot_2.png

Pangane
Frequent Visitor

Hi v-tianyich-msft,

I have found solution using excel formula like below. but i'm unable to get in dax power. my solution for this problem in excel as per below.

 

Below last 2 column is my solution & formulas for this column like below

lst change (0=False,1=True)No. of time lts change
=IF(AND(X39<>X38,W39=W38),1,0)=SUMIFS($Y$39:$Y$53,$W$39:$W$53,W39)
=IF(AND(X40<>X39,W40=W39),1,0)=SUMIFS($Y$39:$Y$53,$W$39:$W$53,W40)
=IF(AND(X41<>X40,W41=W40),1,0)=SUMIFS($Y$39:$Y$53,$W$39:$W$53,W41)
=IF(AND(X42<>X41,W42=W41),1,0)=SUMIFS($Y$39:$Y$53,$W$39:$W$53,W42)
=IF(AND(X43<>X42,W43=W42),1,0)=SUMIFS($Y$39:$Y$53,$W$39:$W$53,W43)
=IF(AND(X44<>X43,W44=W43),1,0)=SUMIFS($Y$39:$Y$53,$W$39:$W$53,W44)
=IF(AND(X45<>X44,W45=W44),1,0)=SUMIFS($Y$39:$Y$53,$W$39:$W$53,W45)
=IF(AND(X46<>X45,W46=W45),1,0)=SUMIFS($Y$39:$Y$53,$W$39:$W$53,W46)
=IF(AND(X47<>X46,W47=W46),1,0)=SUMIFS($Y$39:$Y$53,$W$39:$W$53,W47)
=IF(AND(X48<>X47,W48=W47),1,0)=SUMIFS($Y$39:$Y$53,$W$39:$W$53,W48)
=IF(AND(X49<>X48,W49=W48),1,0)=SUMIFS($Y$39:$Y$53,$W$39:$W$53,W49)
=IF(AND(X50<>X49,W50=W49),1,0)=SUMIFS($Y$39:$Y$53,$W$39:$W$53,W50)
=IF(AND(X51<>X50,W51=W50),1,0)=SUMIFS($Y$39:$Y$53,$W$39:$W$53,W51)
=IF(AND(X52<>X51,W52=W51),1,0)=SUMIFS($Y$39:$Y$53,$W$39:$W$53,W52)
=IF(AND(X53<>X52,W53=W52),1,0)=SUMIFS($Y$39:$Y$53,$W$39:$W$53,W53)
WidLTSlst change (0=False,1=True)No. of time lts change
16/11/202301
16/11/202301
112/11/202311
23/10/202300
23/10/202300
312/11/202302
33/10/202312
33/10/202302
36/11/202312
412/11/202302
43/10/202312
43/10/202302
46/11/202312
56/11/202300
56/11/202300
v-tianyich-msft
Community Support
Community Support

Hi @Pangane ,

 

Based on your description, I'm wondering you're trying to total the number of modifications by LTS, and you can check the results as follows:

vtianyichmsft_0-1699517747992.png

 

Try these expression:

Measure = var _t = ADDCOLUMNS('Table',"sum",sumX (
                    FILTER (ALL('Table'), [LTS] = EARLIER ( [LTS]) ),
                   [lts change count]
                ))
return MAXX(_t,[sum])

Table 2 = var _t = ADDCOLUMNS('Table',"sum",sumX (
                    FILTER (ALL('Table'), [LTS] = EARLIER ( [LTS])),
                   [lts change count]
                ))
return _t

 

Please feel free to correct me and provide more information if I have misunderstood you!

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi  v-tianyich-msft,

 

Thanks for your reply! actually i want lts change count not its sum. because i have wid & lts date. i want to know how many times lts date change for particular id.

E.g. if i want to count in another column. how much time lts changed for wid 1. it should show 1 because first we set lts date 06th Nove but we change it to 12th Nov. so we change 1 time . so i want 1 in next column

 

WidLTS
16/11/2023
16/11/2023
112/11/2023
23/10/2023
23/10/2023
312/11/2023
33/10/2023
33/10/2023
36/11/2023
412/11/2023
43/10/2023
43/10/2023
46/11/2023
56/11/2023
56/11/2023

 

 

PREVIEW
 
 
 

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.