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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
_onto_
Frequent Visitor

custom grouping - query authoring

Hi,

 

I was wondering if it is possible to author a query that does some aggregation using some custom grouping in a scenario where I do not have access to the model and cannot use a composite model.

 

For example I have a date table where I am grouping months by Season:

SummerJul
SummerAug
SummerJun
FallSep
FallOct
FallNov
WinterDec
WinterJan
WinterFeb
SpringMar
SpringApr
SpringMay

 

and I can do something like this:

SUMMARIZECOLUMNS('Date'[Season]
	, ROLLUPADDISSUBTOTAL('Date'[Month], "Season Total")
	, "Distinct Products", [Number of Products]
	)

to get number of products transacted by month, season and get season totals:

SeasonMonthSeason TotalDistinct Products
FallNovFalse10
FallOctFalse9
SummerJunFalse10
SpringMayFalse9
FallSepFalse9
WinterJanFalse8
SpringAprFalse11
SummerAugFalse10
SpringMarFalse9
WinterFebFalse9
WinterDecFalse10
SummerJulFalse7
Spring True11
Winter True11
Fall True11
Summer True11

 

But what if I want to re-group my months into, say:

DrinkMonth
WhateverNov
WhateverOct
BeerJun
BeerMay
WhateverSep
WineJan
BeerApr
BeerAug
BeerMar
WineFeb
WineDec

 

to get something like this:

DrinkMonthDrink TotalDistinct Products
WhateverNovFalse10
WhateverOctFalse9
BeerJunFalse10
BeerMayFalse9
WhateverSepFalse9
WineJanFalse8
BeerAprFalse11
BeerAugFalse10
BeerMarFalse9
WineFebFalse9
WineDecFalse10
BeerJulFalse7
Beer True11
Wine True11
Whatever True11

 

Would something like this be possible through just a DAX query?

 

Thank you!

 

2 REPLIES 2
lbendlin
Super User
Super User

Not really.  Power BI does not support dynamic buckets.

 

Best you can do is enable "Personalize Visuals"  and teach your users how to use that awesome feature.

Yeah, I was kind of thinking about it as a lineage manipulation problem. Maybe wishful thinking.

Helpful resources

Announcements
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.