Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am trying to create a flag in the report to indicate which IP address has more than 1 member signing in within 3 consecutive days.
Data looks like -
Expected result -
yellow case - it obsiously has multiple members signing in , so a flag of 1
orange case - as there were more than 1 member signing in on 3/5 and 4/5, so a flag of 1
green case - as B signed in more than 3 days from A, so a flag of 0
Can you please help me with the DAX? thank you
Solved! Go to Solution.
Hi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
WINDOW function (DAX) - DAX | Microsoft Learn
expected result measure: =
SUMX (
VALUES ( data[ip_address] ),
CALCULATE (
IF (
COUNTROWS (
FILTER (
ADDCOLUMNS (
SUMMARIZE ( data, 'calendar'[Date] ),
"@result",
CALCULATE (
COUNTROWS ( SUMMARIZE ( data, data[member] ) ),
WINDOW (
-2,
REL,
0,
REL,
ALL ( 'calendar'[Date] ),
ORDERBY ( 'calendar'[Date], ASC )
)
)
),
[@result] > 1
)
) > 0,
1,
0
)
)
)
Hi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
WINDOW function (DAX) - DAX | Microsoft Learn
expected result measure: =
SUMX (
VALUES ( data[ip_address] ),
CALCULATE (
IF (
COUNTROWS (
FILTER (
ADDCOLUMNS (
SUMMARIZE ( data, 'calendar'[Date] ),
"@result",
CALCULATE (
COUNTROWS ( SUMMARIZE ( data, data[member] ) ),
WINDOW (
-2,
REL,
0,
REL,
ALL ( 'calendar'[Date] ),
ORDERBY ( 'calendar'[Date], ASC )
)
)
),
[@result] > 1
)
) > 0,
1,
0
)
)
)
Thank you so much for spending the time to do this! it works like a charm. I need to google to understand a couple of functions in there but wow....you are amazing! thank you
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 19 | |
| 12 | |
| 11 |