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
idontexist
Helper I
Helper I

Calculate several numeric values

Hi guys,

 

I need to calculate values like the following:

 

 PlanFactNew measure
 15  
 15  
 15  
 15  
 151515
 15  
 15  
 15  
 15  
 15  
 15  
 15  
Total1801515

 

I almost done this with Matrix plan = if(not(ISBLANK([Fact]));'Local Measure'[Plan];blank()) but it shows me wrong value in totals (still 180 instead of 15).

 

Plan and Fact values from different tables. Both tables - live and already calculated data. 

 

Is that possbile to do?

9 REPLIES 9
Zubair_Muhammad
Community Champion
Community Champion

HI @idontexist

 

Try adding if hasonevalue before your MEASURE

 

If(hasoneValue(LocalMEasure[Plan]), YourMEASURE)


Regards
Zubair

Please try my custom visuals

Hi @Zubair_Muhammad

 

But if value is not only one? It could be several values.

@idontexist

 

is the Plan Column aggregated in some way?


Regards
Zubair

Please try my custom visuals

@Zubair_Muhammad

 

It's plan for store for all days in month.  Table "plan" contains 3 columns: date, store code and value. Value already calculated before downloading in live cube, so it's just number.

Hi @idontexist,

 

Can you share the pbix file please? The relationship between two tables could affect the result.

 

Best Regards,

Dale

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

Hi, @v-jiascu-msft

 

i can do that, but you will not be able to see anything, as it's connected to live cube. And i don't have rights to grant you access.

Hi @idontexist,

 

As far as I know, we can't create a measure in the mode live to SSAS cube. Did I miss something?

 

Best Regards,

Dale

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

@v-jiascu-msft

 

We can't create new columns. But new measures we can.

Hi @idontexist,

 

Hasonevalue could work. Please see the example below. What's your report like? Can you share a snapshot?

Measure 6 =
IF (
    HASONEVALUE ( 'DimProduct'[ClassName] ),
    SUM ( FactSales[SalesQuantity] ),
    0
)

Calculate_several_numeric_values

 

Best Regard,

Dale

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

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.