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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
OlafPrevo
Regular Visitor

Results all stores in a region in a table based on selection of a specific store

In my dataset, all stores belong to a region. Now I would like a table with all sales results from stores that are in the same region as the store I selected.

 

I do not select a region, but a specific store. Anyone knows if this is possible? 

 

Thanks in advance for your reply

4 REPLIES 4
OlafPrevo
Regular Visitor

I'm trying to create a same table as I have in Qlikview. In Qlikview the code for the variable is:

 

SUM( 
	{$<
		DateTime.AccountingYear		= {$(vYear)},
		DateTime.AccountingWeek		= {$(vWeek)},
		StoreGroup.RayonName		= P(StoreGroup.RayonName),
		Store.Number			= ,
		Store.Name			= 
	>} 
	SalesItem.SalesAmountIncl
	)

 

Anonymous
Not applicable

This should do it:

 

// Stores is a dimension with Region
// in it and stores are identified 
// by StoreID. Please do not attempt
// this if you only have one big
// table in your model without a proper
// dimensional design.

[Regional Sales] =
var __oneRegionVisible =
	DISTINCTCOUNT( Stores[Region] ) = 1
var __result =
	CALCULATE(
		[Total Sales],
		FILTER(
			VALUES( Stores[Region] ),
			__oneRegionVisible
		),
		ALL( Stores )
	)
RETURN
	__result

 

Best

D

Anonymous
Not applicable

// Stores is a dimension with Region
// in it and stores are identified 
// by StoreID. Please do not attempt
// this if you only have one big
// table in your model without a proper
// dimensional design.

[Regional Sales] =
	CALCULATE(
		[Total Sales],
		VALUES( Stores[Region] ),
		ALL( Stores )
	)

 

Best

D

First Thanks for your quick respons. I Forgot to mention that I Would like to se the sales results for eacht individual store, but only for the stores that are in the same region as the selected store. This solutions doesn't work in this case.  

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.