Forum Discussion
JCG99
2 years agoRegular Visitor
Grouping with gaps
Hello, I am trying to group data with gaps inside them. This is a sample of my data: distance from distance to built year Type road Living area Zone State 0 10 1990 Alley Ye...
- Anonymous2 years ago
Hi JCG99
Please try the following DAX:Min from = VAR _selectyear = SELECTEDVALUE('Table'[built year ]) VAR _selecttype = SELECTEDVALUE('Table'[Type road ]) RETURN MINX(FILTER(ALL('Table'),'Table'[built year ] = _selectyear && 'Table'[Type road ]=_selecttype),'Table'[distance from])Max to = VAR _selectyear = SELECTEDVALUE('Table'[built year ]) VAR _selecttype = SELECTEDVALUE('Table'[Type road ]) RETURN MAXX(FILTER(ALL('Table'),'Table'[built year ] = _selectyear && 'Table'[Type road ]=_selecttype),'Table'[distance to ])Result:
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
2 years agoNot applicable
Hi JCG99
Please try the following DAX:
Min from =
VAR _selectyear = SELECTEDVALUE('Table'[built year ])
VAR _selecttype = SELECTEDVALUE('Table'[Type road ])
RETURN
MINX(FILTER(ALL('Table'),'Table'[built year ] = _selectyear && 'Table'[Type road ]=_selecttype),'Table'[distance from])Max to =
VAR _selectyear = SELECTEDVALUE('Table'[built year ])
VAR _selecttype = SELECTEDVALUE('Table'[Type road ])
RETURN
MAXX(FILTER(ALL('Table'),'Table'[built year ] = _selectyear && 'Table'[Type road ]=_selecttype),'Table'[distance to ])
Result:
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.