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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
MacroHardOnFire
Frequent Visitor

Comparison Between Two Variables

I'm working on a report where I need to display comparisons of two binary categories. In particular, I need to show both raw numbers and gaps between them. The raw numbers are easy, and the gap isn't difficult if I know what the two categories are. I want the display percentage gaps between groups A and B like below, where positive numbers indicate that the gap between A and B favors A, and negative numbers the opposite. It also changes colors based on if the number is positive or negative.

MacroHardOnFire_0-1682626523712.png

Here's the challenge: I want A and B to be variables. Specifically, I want them to be variable filters that the user can choose and change at will. This is all on a single dataset, so it's easy to filter these categories individually. My challenge is applying these two different filters to a single visualization. For example, comparing in-state vs out-of-state, where more in-state for a given year is positive, and more out-of-state for a given year is negative. I want this to be possible across a wide range of categories that the user can choose.

 

4 REPLIES 4
v-rzhou-msft
Community Support
Community Support

Hi @MacroHardOnFire ,

 

Please share a sample file with me and show me a screenshot with the result you want. This will make it easier for me to find the solution.

 

Best Regards,
Rico Zhou

 

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

I want to make something like the below screenshots. The sample data will be in the following post.

MacroHardOnFire_4-1683220714073.png

 

MacroHardOnFire_5-1683220750082.png

 

MacroHardOnFire_6-1683220791793.pngMacroHardOnFire_7-1683220822769.png

IDYearNameGenderAcquired PowersBeyond Cameo
12000AquamanMaleBirthYes
22000AtomMaleNoneYes
32000Atom-SmasherMaleLaterYes
42000AztekMaleNoneNo
52000B'wana BeastMaleLaterYes
62000BatmanMaleNoneYes
72000Black CanaryFemaleBirthYes
82000Blue DevilMaleLaterNo
92000Booster GoldMaleNoneNo
102000Captain AtomMaleLaterYes
112000Captain MarvelMaleLaterYes
122000Commander SteelMaleNoneNo
132000CreeperMaleLaterYes
142000Crimson AvengerMaleNoneNo
152000Crimson FoxFemaleBirthNo
162000Doctor FateMaleLaterYes
172000Doctor LightFemaleLaterNo
182000Doctor Mid-NiteMaleNoneNo
192000DoveMaleLaterYes
202000Elongated ManMaleLaterNo
212001EtriganMaleLaterYes
222001FireFemaleLaterYes
232001FlashMaleLaterYes
242001Green ArrowMaleNoneYes
252001GypsyFemaleBirthNo
262001HawkMaleLaterYes
272001HawkgirlFemaleBirthYes
282001HourmanMaleLaterNo
292001HuntressFemaleNoneYes
302001IceFemaleBirthNo

312001Johnny ThunderMaleLaterNo
322001Long ShadowMaleBirthYes
332001Martian ManhunterMaleBirthYes
342001MetamorphoMaleLaterYes
352001Mr. TerrificMaleNoneYes
362001NemesisMaleNoneNo
372001ObsidianMaleBirthNo
382001OrionMaleBirthYes
392001Plastic ManMaleLaterNo
402001QuestionMaleNoneYes
412002RayMaleBirthNo
422002Red TornadoMaleBirthNo
432002Rocket RedMaleNoneNo
442002S.T.R.I.P.E.MaleNoneYes
452002SandMaleLaterNo
462002Shining KnightMaleNoneYes
472002SpeedyMaleNoneNo
482002StargirlFemaleNoneYes
492002StarmanMaleNoneNo
502002SteelMaleNoneYes
512002John StewartMaleNoneYes
522002SupergirlFemaleBirthYes
532002SupermanMaleBirthYes
542002VibeMaleBirthNo
552002VigilanteMaleNoneYes
562002VixenFemaleLaterYes
572002WaveriderMaleLaterNo
582002WildcatMaleNoneYes
592002Wonder WomanFemaleBirthYes
602002ZatannaFemaleBirthYes

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Solution Authors