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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
harirao
Post Prodigy
Post Prodigy

Need to include Filter inside CalculateTable

Hi All,
I am working on a dax , required to add one filter inside the below dax(highlited in green)

Visibility = MEDIANX(
SUMMARIZE(Query1,Query1[Actual _Wk_Cond2],Query1[subregion],Query1[actual_visibility_Weeks],Query1[OpportunityId],"Viswks",
COUNT(Query1[OpportunityId])),
[actual_visibility_Weeks])

Filter to be added i.e Query1[Actual _Wk_Cond2]="Yes"


Please help me on above.
Thank you.

Regards,
Hari
3 ACCEPTED SOLUTIONS
tex628
Community Champion
Community Champion

Try this:

Visibility = 
MEDIANX(
SUMMARIZE(
	Filter(Query1,Query1[Actual _Wk_Cond2] = "Yes"),
	Query1[Actual _Wk_Cond2],
	Query1[subregion],
	Query1[actual_visibility_Weeks],
	Query1[OpportunityId],
	"Viswks",
	COUNT(Query1[OpportunityId])
),
[actual_visibility_Weeks])

Connect on LinkedIn

View solution in original post

amitchandak
Super User
Super User

@harirao , try like

Visibility = MEDIANX(
SUMMARIZE(filter(Query1[Actual _Wk_Cond2]="Yes"
),Query1[Actual _Wk_Cond2],Query1[subregion],Query1[actual_visibility_Weeks],Query1[OpportunityId],"Viswks",
COUNT(Query1[OpportunityId])),
[actual_visibility_Weeks])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Visibility = MEDIANX(
SUMMARIZE(filter(Query1,Query1[Actual _Wk_Cond2]="Yes"
),Query1[Actual _Wk_Cond2],Query1[subregion],Query1[actual_visibility_Weeks],Query1[OpportunityId],"Viswks",
COUNT(Query1[OpportunityId])),
[actual_visibility_Weeks])

 

Query1 in the filter is missing. My mistake

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@harirao , try like

Visibility = MEDIANX(
SUMMARIZE(filter(Query1[Actual _Wk_Cond2]="Yes"
),Query1[Actual _Wk_Cond2],Query1[subregion],Query1[actual_visibility_Weeks],Query1[OpportunityId],"Viswks",
COUNT(Query1[OpportunityId])),
[actual_visibility_Weeks])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

 Hi @amitchandak 

Thanks for your response, getting error.
4.PNG
Regards,

Hari

Visibility = MEDIANX(
SUMMARIZE(filter(Query1,Query1[Actual _Wk_Cond2]="Yes"
),Query1[Actual _Wk_Cond2],Query1[subregion],Query1[actual_visibility_Weeks],Query1[OpportunityId],"Viswks",
COUNT(Query1[OpportunityId])),
[actual_visibility_Weeks])

 

Query1 in the filter is missing. My mistake

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
tex628
Community Champion
Community Champion

Try this:

Visibility = 
MEDIANX(
SUMMARIZE(
	Filter(Query1,Query1[Actual _Wk_Cond2] = "Yes"),
	Query1[Actual _Wk_Cond2],
	Query1[subregion],
	Query1[actual_visibility_Weeks],
	Query1[OpportunityId],
	"Viswks",
	COUNT(Query1[OpportunityId])
),
[actual_visibility_Weeks])

Connect on LinkedIn

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.