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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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