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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Chandrashekar
Resolver III
Resolver III

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!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

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!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

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!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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