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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
CosmicHorse95
Advocate I
Advocate I

Help with DAX Language

Hello, 

I'm extremely new to this program, and don't fully understand how the language works.

 

I managed to create a table to display the data I need (see picture) but I really need to create it in the form of a Measure.

Each state has a grand total of Positive and Negative samples. I need a measure that can express "DelawareNegSamples" and "AlabamaNegSamples" and "DelawarePosSamples" etc etc.

All this data is being pulled from my imported sheet that includes a Case number, state, total samples, positive samples, and negative samples. (see second picture)State Pos Neg Totals.png

 

StateScreenshot.jpg

 

 

I'm sorry if this doesn't make any sense. If you have further questions about what I'm asking, please let me know.

Thank you in advance!

1 ACCEPTED SOLUTION
BeaBF
Impactful Individual
Impactful Individual

@CosmicHorse95 

Measure = CALCULATE(SUM([#Negative]), [State] = "Alabama")

 

Try this!

B.

View solution in original post

5 REPLIES 5
BeaBF
Impactful Individual
Impactful Individual

@CosmicHorse95 

Measure = CALCULATE(SUM([#Negative]), [State] = "Alabama")

 

Try this!

B.

This works perfectly, thank you so much!!!!

BeaBF
Impactful Individual
Impactful Individual

@CosmicHorse95  can you send the table on which create the mesure? And explain to me what measures would you need?

B.

@CosmicHorse95 , where will use use those measures? what is the final result you want to achieve?

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

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

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

@BeaBF  I'm sorry, I have no idea how to send a table. I need a measure that is basically 

AlabamaNegSamples= [#Neg] IF(state="alabama") but i don't know how to say that in the DAX language.

 

@ERD I'm going to be using these measures for pie charts and/or bar graphs, comparing positive and negative samples from individual states. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors