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

Iterating a measure value based on attribute

Hi,

 

Am trying to iterate a measure value and count the attributes based on satisfying condition on measure, for ex: if i have a table with measure(measure A) calculated dynamically, i need to count ID based on condition MeasureA=3. Is this possible ??

 

IDCategoryMeasureA
1Transport1
2Health3
3Food3
4Education1

 

Thanks for your help.

 

Regards,

Prabin

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Iterating a measure value based on attribute

Hi @pkn 

Add columns and measures in a table visual

Create another measure based on one measure

Measure 2 = CALCULATE(COUNT(Sheet7[ID]),FILTER(ALL(Sheet7),Sheet7[Measure]=3))

12.png

When changing [Measure] value, [Measure 2] value changes accordingly.

13.png

 

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Super User
Super User

Re: Iterating a measure value based on attribute

@pkn your question is not fully clear, Did you calculated "MeasureA" as measure in the model? What is the expression for it? What you are trying to achieve? What you mean by "MeasureA" = 3






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

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





pkn Frequent Visitor
Frequent Visitor

Re: Iterating a measure value based on attribute

Hi,

In my model i have few measures which are calculated on the fly.Eventually they produce values ranging from 1 to 10 but since those are measures ,i am not able to store their values.

 

I just wanted to know whether we can store them in a table and then use those values to create other aggregations as well based on their result

Regards
Prabin Nepak 

Super User
Super User

Re: Iterating a measure value based on attribute

@pkn you can surely create a table with those measure then use it, without knowing the full details it is very hard to say whether creating the table is right approach or you should be using these measures in other measure to achieve the goal.

 

Your question is very vague and very hard to answer.






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

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Community Support Team
Community Support Team

Re: Iterating a measure value based on attribute

Hi @pkn 

Add columns and measures in a table visual

Create another measure based on one measure

Measure 2 = CALCULATE(COUNT(Sheet7[ID]),FILTER(ALL(Sheet7),Sheet7[Measure]=3))

12.png

When changing [Measure] value, [Measure 2] value changes accordingly.

13.png

 

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Community Support Team
Community Support Team

Re: Iterating a measure value based on attribute

Hi @pkn 

If you'd like the filter value to change dynamically, you could create a what-if parameter in Power BI Desktop,

Then use this parameter measure in the measure

Measure 3 = CALCULATE(COUNT(Sheet7[ID]),FILTER(ALL(Sheet7),Sheet7[Measure]=[Parameter Value]))

14.png

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 318 members 3,220 guests
Please welcome our newest community members: