The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
Regards,
Chandrashekar B
Solved! Go to Solution.
@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] )
)
@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] )
)
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
Hello,
I used sorting column but am unable to hide the sorting column. is there any way we can hide it.
Regards,
Chandrashekar B
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.
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):
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):
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,
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |