Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Good day,
I use live connection and some functions are limited. Now I have measure providing the delta between Shipped and Entry date. Now will need measure to group the delta in range of days 1-7, 8-14, 14-21, Over 21.
Exs in excel where Groups are present
Thanks
Solved! Go to Solution.
@NDDD I think I see the issue. Try this:
Groups_Measure =
VAR _delta = [Delta Ship-Entry]
RETURN
IF(
NOT ISBLANK(_delta),
SWITCH(
TRUE(),
_delta <= 7, "1-7",
_delta <= 14, "8-14",
"15-21"
))
Thanks for the prompt reply, this solution didn't work. Power Bi keeps loading the newly measure
@NDDD very strange.
Can you send screeshots from your Power BI. Where did you put that measure. What is table in the model and in case you created a table visual, also that.
@SpartaBI It seems the problem is when adding a column for another table. Then, as in my previous message we see blanks and one group of 1-7.
@SpartaBI seems when using first measure (calculating the delta Ship - Entry) along the new Group measure (as you suggested) is having error.
But when I use slicer is showing correct output
@NDDD I think I see the issue. Try this:
Groups_Measure =
VAR _delta = [Delta Ship-Entry]
RETURN
IF(
NOT ISBLANK(_delta),
SWITCH(
TRUE(),
_delta <= 7, "1-7",
_delta <= 14, "8-14",
"15-21"
))
Groups_Measure =
VAR _delta = [Delta Ship-Entry]
RETURN
SWITCH(
TRUE(),
_delta <= 7, "1-7",
_delta <= 14, "8-14",
"15-21"
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
13 | |
11 | |
10 | |
9 |
User | Count |
---|---|
18 | |
14 | |
14 | |
12 | |
11 |