cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CosmicHorse95
Frequent Visitor

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
bf
Resolver II
Resolver II

@CosmicHorse95 

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

 

Try this!

B.

View solution in original post

5 REPLIES 5
bf
Resolver II
Resolver II

@CosmicHorse95 

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

 

Try this!

B.

View solution in original post

CosmicHorse95
Frequent Visitor

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

bf
Resolver II
Resolver II

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

B.

ERD
Super User
Super User

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

@bf  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
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors