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

visualizing two column with same contents

Hi all,

 

I have data set in CSV which had two columns for the source of events.  There are 8 options available for sources, and 2 can be picked and stored in CSV columns. How can I show these 8 options in power bi with % of total quantity?

idDateaddressstore_idemployee_idcatsubcatsub-subcatsizesource1sourceqtytype of creditnote
125736/11/2020gdgdfgdf2355ujrth56432143routwearcoatlio-3514loiloi6fix 
125736/11/2020gdgdfgdf2355ujrth56432143rbottomskirtreview10kimvto16loan 
125736/11/2020gdgdfgdf2355rhytrhtrhrkidsschoolhat4jetylp2credit 
125736/11/2020gdgdfgdf2355grehytraccesorybagbackpack-ylploi1high 
125736/11/2020gdgdfgdf2355ujrth56432143raccesorywatchsmartwdollykim1fix 
125736/11/2020bdfgjjg3358egrhtr900toydollbellassmojet2loan 
125739/11/2020bdfgjjg3358dfrhrdhoutwearraincoartlong12jetylp4credit 
125739/11/2020bdfgjjg3358egrhtr900kidsskirtbelt8ylpdolly4high 
125739/11/2020bdfgjjg3358grhrh23332toyxbox3-loismo1fix 
125739/11/2020cvbffdbfgb58744yrttyytik89accesoryhair dryer200w-vtojet9loan 
125739/11/2020bsfdbgff2358retert9885bottompantskinny6dollyylp4credit 
125739/11/2020streyhrt4587ryrurtj3255topshirtvneck8comeloi10high 
125739/11/2020streyhrt4587ryyhrtrtj3256topblouseribbon8kimvto8fix 
125739/11/2020streyhrt4587ryyhrtrtj3256kidsdressdisney6jetdolly6loan 
125739/11/2020reryrtrt2358hrthjt225588accesoryhair tiebow-ylpcome1credit 
125739/11/2020 ghhtrjrtj3687hdfhnfg9863toptshirtwhite10dollyvto40high 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Create a new table contains all source.

Table 2 = DISTINCT(UNION(SELECTCOLUMNS('Table',"source",'Table'[source]),SELECTCOLUMNS('Table',"source",'Table'[source1])))

3.PNG 

Then create a measure.

Measure = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[source]=SELECTEDVALUE('Table 2'[source])||'Table'[source1]=SELECTEDVALUE('Table 2'[source])))/COUNTROWS('Table')

Result would be shown as below.

4.PNG

 

Best Regards,

Jay

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

Create a new table contains all source.

Table 2 = DISTINCT(UNION(SELECTCOLUMNS('Table',"source",'Table'[source]),SELECTCOLUMNS('Table',"source",'Table'[source1])))

3.PNG 

Then create a measure.

Measure = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[source]=SELECTEDVALUE('Table 2'[source])||'Table'[source1]=SELECTEDVALUE('Table 2'[source])))/COUNTROWS('Table')

Result would be shown as below.

4.PNG

 

Best Regards,

Jay

amitchandak
Super User
Super User

@Anonymous , Create a source dimension distinct from these two (https://www.youtube.com/watch?v=Bkf35Roman8)

 

Join with both sources, One join will inactive. Create a measure to activate that join and use userelationship

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in-power-bi

https://www.youtube.com/watch?v=e6Y-l_JtCq4

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