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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
agarwala
Helper I
Helper I

Deleted

Deleted

1 ACCEPTED SOLUTION

Hello Zhu,

I tried changing the cross filter direction too but it dint work.

At the end I have created the calculated column in  table 2 which will store the count of CVE_ID here is the DAX:

 COUNTROWS(                
FILTER(                              
   'API_SOFTWARE_VULNERABILIITIES_MACHINE',                        
  'API_SOFTWARE_VULNERABILIITIES_MACHINE'[CVEID] = EARLIER('API_SOFTWARE_VULNERABILIITIES_MACHINE'[CVEID])
)
 )
And then I referred that in table 1.
It solved my issue.
Thank you so much for all the replies to my post 🙂
 
 

View solution in original post

11 REPLIES 11
shafiz_p
Super User
Super User

Hi @agarwala  You measure should work. Please check which column you have placed in table rows. The CVEID column should be place in rows from Table2 or in slicer.


danextian
Super User
Super User

Your formula should work as a measure. In what way is it wrong?





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Its showing the count just as 1 instead of 312.

 

I am going crazy unable to understand why is this happening.

 

 

Ashish_Mathur
Super User
Super User

Hi,

Create a single column Dim tableof CVEID from both tables.  Create a many to One relationship from both fact tables to this Dim table.  To your visual, drag CVEID from the Dim table. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
ribisht17
Super User
Super User

hi @agarwala 

 

Have you tried Power BI LOOKUPVALUE | Examples of LOOKUPVALUE Dax Function function to achieve the same ?

 

Regards,

Ritesh

Please mark the answer if helpful so that it can help others as well

Hello,

 

I am not storing the counts in the table I have created the measures so not sure how will I use VLOOKUP here?

 

hi @agarwala 

 

I am not having any problem in getting the answer 

 

Just check of you need to swap table 1 and 2 in the DAX

ribisht17_0-1731131760145.png

 

Regards,

Ritesh

Please mark the answer if helpful so that it can help others as well

 

 

 

Thank you for your suggestions I again tried it today and this is how my table 1 and table 2 looks like:

Table 1 :

agarwala_0-1731207016965.png
Table 2:

agarwala_1-1731207037220.png

When I am choosing the row of table 1 table 2 visual shows the count as below:

 

agarwala_3-1731207154010.png

there is absolutely no relationship between these 2 tables still its changing the count to 2 which is what I am unable to understand and this is the same count I am getting when using the formula above to combine both the tables:

agarwala_4-1731207258502.png

I want the second count to show as 624 and not 2.
Could you pls suggest why is this happening?

 

Cheers

Arti

 

 

Hello,

I just realised that these two tables are related to one other table and they have many-to-many relationship with that common table so when I made one of the relationship as inactive it worked absolutely fine:

agarwala_5-1731210071813.png

agarwala_6-1731210153078.png

 

But in my case I want to keep both the relationships active.

Are there any suggestions on how I could make this work keeping both the relationships active.

 

Anonymous
Not applicable

Thanks for the replies from shafiz_p, danextian, Ashish_Mathur, ribisht17.

 

Hi @agarwala ,

 

You can try to change the direction of cross-filtering from both to single and filter the other two tables from the common table. If the problem persists, could you please provide the pbix file with the sensitive data removed to better pinpoint the problem?

 

Best Regards,
Zhu

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.

Hello Zhu,

I tried changing the cross filter direction too but it dint work.

At the end I have created the calculated column in  table 2 which will store the count of CVE_ID here is the DAX:

 COUNTROWS(                
FILTER(                              
   'API_SOFTWARE_VULNERABILIITIES_MACHINE',                        
  'API_SOFTWARE_VULNERABILIITIES_MACHINE'[CVEID] = EARLIER('API_SOFTWARE_VULNERABILIITIES_MACHINE'[CVEID])
)
 )
And then I referred that in table 1.
It solved my issue.
Thank you so much for all the replies to my post 🙂
 
 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.