cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Chandrashekar
Resolver II
Resolver II

Dax Formula - Getting Count with multi tables(not related)

Hello Team,

 

Can you guide me with Dax formula to get count where one table(not established relationship_. Formula should consider slicer(Date) and change value accordingly.

1. Source and Grade table - have established relation

2. Date table - not established relation with any table.

 

Chandrashekar_0-1641723311427.png

 

Regards,

Chandrashekar B

 

 

1 ACCEPTED SOLUTION
smpa01
Super User
Super User

@Chandrashekar  it is certainly possible

 

_countrows = 
VAR _name =
    MAX ( Table3[Name] )
VAR _location =
    MAX ( Table3[Location] )
VAR _tbl =
    CROSSJOIN (
        SELECTCOLUMNS ( { _name }, "name", [Value] ),
        SELECTCOLUMNS ( { _location }, "location", [Value] )
    )
RETURN
    CALCULATE (
        COUNTROWS ( Table1 ),
        TREATAS ( _tbl, Table1[Name], Table1[Location] )
    )

 

 

smpa01_0-1641761871967.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






New Animated Dashboard: Sales Calendar


View solution in original post

9 REPLIES 9
smpa01
Super User
Super User

@Chandrashekar  it is certainly possible

 

_countrows = 
VAR _name =
    MAX ( Table3[Name] )
VAR _location =
    MAX ( Table3[Location] )
VAR _tbl =
    CROSSJOIN (
        SELECTCOLUMNS ( { _name }, "name", [Value] ),
        SELECTCOLUMNS ( { _location }, "location", [Value] )
    )
RETURN
    CALCULATE (
        COUNTROWS ( Table1 ),
        TREATAS ( _tbl, Table1[Name], Table1[Location] )
    )

 

 

smpa01_0-1641761871967.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






New Animated Dashboard: Sales Calendar


Hello,

 

It is working perfectly and can you let me know if I can order Location for ex(1. My and 2. BL).

 

Regards,

 

Chandrashekar B

@Chandrashekar  yes you can by clicking on the location 

smpa01_0-1641821292674.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






New Animated Dashboard: Sales Calendar


Hello,

I used sorting column but am unable to hide the sorting column. is there any way we can hide it.

 

Regards,

Chandrashekar B

ValtteriN
Super User
Super User

Hi,

You could create a passive realtionship between the tables and use USERELATIONSHIP. Another option would be to include the [Date] in your calculate. I would need more information on your issue to create an example.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hello,

 

Can you please share one example formula for passive relation ship and dax formula for below example

Table 1 field: Company and Region

Table 2 field: Company and Region (Company unique)

Table 3: Date should consider from slicer.

 

Regards,

 

Chandrashekar B

Hello,

 

Can you please share one example formula for passive relation ship and dax formula for below example

Table 1 field: Company and Region

Table 2 field: Company and Region (Company unique)

Table 3: Date should consider from slicer.

 

Updated formula(Changed date):

Chandrashekar_0-1641725973121.png

 

 

Regards,

Hello,

 

Can you please share one example formula for passive relation ship and dax formula for below example

Table 1 field: Company and Region

Table 2 field: Company and Region (Company unique)

Table 3: Date should consider from slicer.

 

Updated formula(Changed date):

Chandrashekar_0-1641725973121.png

 

 

Regards,

Hello Valterri,

 

I have shared pbix file.  PBIX Report 

Could you share dax formula. When I change date in slicer Table should get update accordingly. 

 

Regards,

 

Chandrashekar B

Regards,

Helpful resources

Announcements
August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 24 without aka link and time 768x460.jpg

Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors