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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Resident Rockstar
Resident Rockstar

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?










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


Proud to be a Super User!









"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.

 

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
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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.