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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors