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
Anonymous
Not applicable

Fact to Dimension unique value

Dear Friends,

 

i have fact and dimension tables with more than thousands of rows as shown:

fact table.JPG

dimension table.JPG

 i want to get Status data in dimension table from fact table in which  MR have only Status="Initial" else empty

for example in fact table: 1317328 & 1321621 have multiple rows but only status="Initial" so the output for dimension table like be:

 

dimension table output.JPG

  Could you please help me, how can i achieve this

Thanks

1 ACCEPTED SOLUTION

@Anonymous , Try like

 

New column =
var _cnt = countx(filter(fact, Fact[MR Number] = dim[MR Number] && fact[Status ] ="Initial"), Fact[MR Number] )
var _cnt1 = countx(filter(fact, Fact[MR Number] = dim[MR Number] ), Fact[MR Number] )
return
if(not(isblank(_cnt)) && _cnt = _cnt1, "Initial", blank())

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
ryan_mayu
Super User
Super User

@Anonymous 

I saw you have different "Initials", you need to unify the letter. maybe in PQ, capitalize each word.

Then create a column in table2

Column = 
if (NOT(ISBLANK(MAXX(FILTER('Table','Table'[MR]='Table (2)'[MR NUMBER] &&'Table'[Capitalize Each Word]<>"Initial"),'Table'[MR]))),BLANK(),"Initial")

1.PNG

 





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

Proud to be a Super User!




amitchandak
Super User
Super User

@Anonymous a, new column in dimension table

 


New column =
var _cnt = countx(filter(fact, Fact[MR Number] = dim[MR Number] && fact[Status ] ="Initial"), Fact[MR Number] )
return
if(isblank(_cnt), blank(), "Initial")

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Dear Sir

i tried with your dax but MR Number are also appearing where Status="Initial" or "Other value".

Output with your dax: 

your output.JPG

Actually i am looking for those MR which  have only Status="Initial"

Requiement Output like:

 

dimension table output.JPG

Thanks

@Anonymous , Try like

 

New column =
var _cnt = countx(filter(fact, Fact[MR Number] = dim[MR Number] && fact[Status ] ="Initial"), Fact[MR Number] )
var _cnt1 = countx(filter(fact, Fact[MR Number] = dim[MR Number] ), Fact[MR Number] )
return
if(not(isblank(_cnt)) && _cnt = _cnt1, "Initial", blank())

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.